FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Pocket PC [Solved]: BTNBMP help
Posts: 87
Joined: Thu Dec 18, 2008 11:27 AM
[Solved]: BTNBMP help
Posted: Thu Oct 20, 2011 01:21 AM

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

Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: BTNBMP help
Posted: Thu Oct 20, 2011 02:00 AM

Hi Ross,
I don't know the exact answer myself but perhaps these threads could help shed some light?

viewtopic.php?f=3t=21167start=0

viewtopic.php?f=3t=2852start=0

&&&&

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 87
Joined: Thu Dec 18, 2008 11:27 AM
Re: [Solved]: BTNBMP help
Posted: Thu Oct 20, 2011 03:56 AM
Many, many thanks Hua. I owe you a cooling drink.

The final code that works (for others who need help) is ...
Code (fw): Select all Collapse
        @ 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 (fw): Select all Collapse
Error E0022 Invalid lvalue: '()'


So beware ...

Cheers,

Ross
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: [Solved]: BTNBMP help
Posted: Thu Oct 20, 2011 07:15 AM

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.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion