[futurebasic] Re: [FB] Smooth expansion of window

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2006 : Group Archive : Group : All Groups

From: Yoshiyuki Hasegawa <hase44@...>
Date: Thu, 23 Mar 2006 20:16:00 +0900
maxclass wrote:
> 
> On Mar 20, 2006, at 3:58 PM, Robert Purves wrote:
> 
>> 
>> Yoshiyuki Hasegawa wrote:
>> 
>>> How is a smooth expansion/reduction/movement of the window done?
>>  

Thank you for the response well.
My program has been improved.

Yoshiyuki

PS. Additional information code.
(Positional correction)
--------------------
local fn Window1
dim as Rect r

setRect(r, 400, 400, 800, 700)
appearance window -1, "Doc Window", @r, _kDocumentWindowClass
'appearance window -1, "Palette Window", @r, _kFloatingWindowClass

SetRect(r, 200, 240, 380, 260)
button 1,_activeBtn,"Same Pos. No Correct", @r,_push

SetRect(r, 200, 200, 380, 220)
button 2,_activeBtn,"Same Pos. with Correct", @r,_push

appearance window 1
end fn

local fn Expansion(id as long )
dim as WindowRef @ w
dim as Rect        r
dim as short      h1 , h2 , v1 ,v2

get window 1, w

// OSX need vertical correct /OS9 need H and V correct for same position
if system( _sysVers ) < 1000 then h1=6:h2=7:v1=7+22:v2=7 else
h1=0:h2=0:v1=22:v2=0
//for Palette Window
'if system( _sysVers ) < 1000 then h1=4:h2=5:v1=1+16:v2=5 else
h1=0:h2=0:v1=16:v2=0

select id
case 1
setRect(r, 400, 400, 800, 700)
case 2
setRect(r, 400-h1, 400-v1, 800+h2, 700+v2)
end select

call TransitionWindow( w, _kWindowSlideTransitionEffect,
_kWindowMoveTransitionAction, r )
end fn

local fn DoDialog
dim as long   evnt, id
evnt  = dialog ( 0 )
id    = dialog ( evnt )
select evnt
case _btnClick
select id
case 1,2
fn Expansion(id)
end select
end select
end fn

fn Window1

on dialog fn DoDialog

do
HANDLEEVENTS
until gFBQuit
--------------------