[futurebasic] Re: [FB] _markedBtn in BevelButton P.S.

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2008 : Group Archive : Group : All Groups

From: Robert Purves <listrp@...>
Date: Sun, 25 May 2008 09:16:25 +1200
Yoshiyuki Hasegawa wrote:

> _markedBtn has been improved by FBtoC 1.1.
> But the change to Unmarked(_activeBtn) is not reflected.

You are right :-(
Thank you for the clear bug report.
I added a new entry in our bugs database:
359	Open		appearance button btnNum, _activeBtn  does nothing

Please use HiliteControl( controlRef, 0 ) as a workaround.
Robert P.

'----------------------
begin enum 1
_cBtn
_c1Btn
_c2Btn
_cBev
end enum

local fn DoDialog
dim as long ev, id
'~'<
ev = dialog(0)
id = dialog(ev)
select ev
case _btnClick
select id
case _c1Btn
appearance button _cBtn, _markedBtn
appearance button _cBev, _markedBtn
beep
case _c2Btn
appearance button _cBtn, _activeBtn // does nothing in FBtoC
appearance button _cBev, _activeBtn // does nothing in FBtoC
#if def _FBtoC
// workaround for bug in FBtoC
HiliteControl( button&( _cBtn ), 0 )
HiliteControl( button&( _cBev ), 0 )
#endif
beep
end select
end select
end fn

dim as Rect r

window 1

SetRect(r, 124, 52, 194, 72)
appearance button _cBtn, _activeBtn,,,,"Button", @r,  
_kControlPushButtonProc

SetRect(r, 166+50, 52, 236+50, 80)
appearance button _cBev, _activeBtn, 0,,,"Bevel", @r,  
_kControlBevelButtonNormalBevelProc

SetRect(r, 124, 116, 194, 136)
appearance button _c1Btn, _activeBtn,,,,"Marked", @r,  
_kControlPushButtonProc

SetRect(r, 124-10, 116+40, 194+10, 136+40)
appearance button _c2Btn, _activeBtn,,,,"Unmarked", @r,  
_kControlPushButtonProc

on dialog fn DoDialog

do
HandleEvents
until gFBQuit
'----------------------