[futurebasic] Re: [FB] Icon or Picture in BevelButton

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

From: Brian Stevens <brilor@...>
Date: Mon, 23 Jan 2006 21:30:12 -0700
On Jan 23, 2006, at 4:49 PM, Brian Heibert wrote:

> I want to add either a picture or a color icon to the bevelbutton
>
> how do I go about doing that?

/*
    Interface code generated with TWM: <http://homepage.ntlworld.com/ 
bernie.w/twm.htm>
*/
local fn BuildUntitled1Wnd
'~'1
dim as Rect                r
dim as WindowAttributes    wa
dim as short             @ setVal

wa = _kWindowCloseBoxAttribute¬
      _kWindowCollapseBoxAttribute¬
      _kWindowFullZoomAttribute¬
      _kWindowResizableAttribute

SetRect( r, 133, 194, 492, 478 )
appearance window -_Untitled1Wnd, "Untitled 1", @r,  
_kDocumentWindowClass, wa
def SetWindowBackground( _kThemeActiveDialogBackgroundBrush, _zTrue )

// Icon on bevel button, 1000 is an icon resource id
SetRect( r, 140, 32, 210, 97 )
appearance button _cBev, _activeBtn, 0, _kControlContentIconSuiteRes,  
1000, "Bevel icon", @r, _kControlBevelButtonNormalBevelProc
setVal = _kControlBevelButtonPlaceBelowGraphic
def SetButtonData( _cBev, _kControlEntireControl,  
_kControlBevelButtonTextPlaceTag, sizeof( short ), setVal )

// Pict on bevel button. Again, 1000 is the resource id of the pict
SetRect( r, 140, 129, 210, 194 )
appearance button _c1Bev, _activeBtn, 0, _kControlContentPictRes,  
1000, "BevelPict", @r, _kControlBevelButtonNormalBevelProc
setVal = _kControlBevelButtonPlaceBelowGraphic
def SetButtonData( _c1Bev, _kControlEntireControl,  
_kControlBevelButtonTextPlaceTag, sizeof( short ), setVal )

appearance window _Untitled1Wnd
end fn