Page 1 of 1

[Solved]: BTNBMP help

PostPosted: Thu Oct 20, 2011 1:21 am
by Ross_ValuSoft
Hello again.

Can anyone give a sample of using the colour clause for BTNBMP please?

The online help for BTNBMP ( http://wiki.fivetechsoft.com/doku.php?i ... nds_btnbmp ) last updated 3 weeks ago does not show a colour clause. Antonio says to use BTNBMP to produce a button with a background colour, but he is obviously too busy to provide a sample.

Anyone?

Thanks,

Ross

Re: BTNBMP help

PostPosted: Thu Oct 20, 2011 2:00 am
by hua
Hi Ross,
I don't know the exact answer myself but perhaps these threads could help shed some light?
viewtopic.php?f=3&t=21167&start=0
viewtopic.php?f=3&t=2852&start=0

Re: [Solved]: BTNBMP help

PostPosted: Thu Oct 20, 2011 3:56 am
by Ross_ValuSoft
Many, many thanks Hua. I owe you a cooling drink.

The final code that works (for others who need help) is ...
Code: Select all  Expand view
        @ 245, 85 BTNBMP oBtn PROMPT "Delete ALL" OF oWndTrash ;
            Action (  IF( MsgYesNo( 'Keep ALL data ?', 'System' ), ;
                   ( Msginfo("Nothing deleted!") ), ; // yes answer
                     ( PurgeAll(), MsgInfo("All test data DELETED"), oWndTrash:End() );  // no answer
                      ) ) SIZE 70, 25

       oBtn:SetColor( CLR_HRED, CLR_YELLOW )
 


However, if I use SetColor( CLR_HRED, CLR_YELLOW ) after the SIZE clause, the compiler complains with ...
Code: Select all  Expand view
Error E0022 Invalid lvalue: '()'


So beware ...

Cheers,

Ross

Re: [Solved]: BTNBMP help

PostPosted: Thu Oct 20, 2011 7:15 am
by hua
Glad to be of help :). When I peruse fwce.ch, which I assume is the main header for FWPPC, it shows that the command syntax for BTNBMP doesn't support the COLOR keyword. It'd need to be done as just how you had described.