Re: PictureButton background color
- Posted by Derek Parnell <ddparnell at bigpond.com> Sep 12, 2002
- 373 views
Jonas, when the bitmap is drawn with transparency, the background at the time of drawing is shown instead of the designated transparency color. This is a once-off thing. It does not automatically get redrawn if the background is altered. What you have to do is recreate the button images whenever the background is altered. 12/09/2002 11:16:54 PM, Jonas Temple <jktemple at yhti.net> wrote: > >Hey all, > >I've got an app where I create picture buttons using xpm: > >-- First set the transparent color >setTransparentColor( getSysColor( COLOR_BTNFACE ) ) >-- Now create the dibs for use with our toolbar >dib1 = createDIB( xpmToEuBmp( preferences_xpm ) ) >dib2 = createDIB( xpmToEuBmp( print_xpm ) ) >dib3 = createDIB( xpmToEuBmp( search_xpm ) ) >dib4 = createDIB( xpmToEuBmp( clock_run_xpm) ) >dib5 = createDIB( xpmToEuBmp( stop_xpm ) ) >dib6 = createDIB( xpmToEuBmp( exit_xpm ) ) >dib7 = createDIB( xpmToEuBmp( help_xpm ) ) >dib8 = createDIB( xpmToEuBmp( connect_xpm ) ) >dib9 = createDIB( xpmToEuBmp( disconnect_xpm ) ) > >When the user changes the system's color settings the background of the >button doesn't change. Do I have to recreate the bitmap with the new >background color and then user setBitmap to update the background color? > Maybe I've answered my own question? > >Thanks, > >Jonas > > > > --------- Cheers, Derek Parnell ICQ# 7647806