[Solved]: BTNBMP help

Post Reply
User avatar
Ross_ValuSoft
Posts: 87
Joined: Thu Dec 18, 2008 11:27 am
Location: Melbourne, Australia

[Solved]: BTNBMP help

Post 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
Last edited by Ross_ValuSoft on Thu Oct 20, 2011 3:47 am, edited 1 time in total.
hua
Posts: 861
Joined: Fri Oct 28, 2005 2:27 am

Re: BTNBMP help

Post by hua »

Hi Ross,
I don't know the exact answer myself but perhaps these threads could help shed some light?
http://forums.fivetechsupport.com/viewt ... 67&start=0
http://forums.fivetechsupport.com/viewt ... 52&start=0
FWH 11.08/FWH 19.03
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
User avatar
Ross_ValuSoft
Posts: 87
Joined: Thu Dec 18, 2008 11:27 am
Location: Melbourne, Australia

Re: [Solved]: BTNBMP help

Post 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

        @ 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

Error E0022 Invalid lvalue: '()'
So beware ...

Cheers,

Ross
hua
Posts: 861
Joined: Fri Oct 28, 2005 2:27 am

Re: [Solved]: BTNBMP help

Post 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.
FWH 11.08/FWH 19.03
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
Post Reply