Say in Toolbar is not transparent.

Say in Toolbar is not transparent.

Postby Davide » Sun Mar 26, 2006 3:43 am

Hello guys.

As subject, for example in rpreview.prg:

Code: Select all  Expand view  RUN
     @ 7, 275 SAY oSay PROMPT TXT_FACTOR ;
          SIZE 60, 15 PIXEL OF oBar FONT oFont
       
     if IsAppThemed()     
        oSay:SetBrush( TBrush():New( "NULL" ) )     
     endif   


I tried different combinations for SetBrush()/oSay etc., even by adding a COLOR clause to the SAY, but can't obtain the say as transparent.

Any ideas ?

Thanks,
Davide.
FWH27/3 - xH 0.99.60 - Bcc 5.5
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Postby Antonio Linares » Mon Mar 27, 2006 12:22 pm

Davide,

try this:

FixSays( oBar:hWnd )
oBar:Refresh()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Davide » Mon Mar 27, 2006 4:17 pm

Antonio,
Antonio Linares wrote:FixSays( oBar:hWnd )
oBar:Refresh()


it works, and the :SetBrush() is not needed at all.
Thank you,
Davide.
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Postby Davide » Sat Apr 01, 2006 3:35 pm

Davide wrote:Antonio,
it works.

I've just found that in the NextPage() PrevPage() (etc.) functions, the oPage (say) is updated with the new page value, and the background is lost.
If I FixSays() as soon as oPage is updated, when clicking the "Next" button, the program ends without any error log.

Eventually, is it possible to put those says into a buttonbar instead of using an oSay object ?

Hi,
Davide.
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Postby Antonio Linares » Sat Apr 01, 2006 4:44 pm

Davide,

You can call FixSays() just once.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Sat Apr 01, 2006 5:24 pm

Davide,

We sent you an enhanced rpreview.prg by email, so you can test it.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Davide » Sun Apr 02, 2006 10:32 am

Antonio,
Antonio Linares wrote:We sent you an enhanced rpreview.prg by email, so you can test it.

ok, it works. Basically, FixSays() is needed only once, after all the says has been defined, while only oBar:Refresh() should be applied each time an oSay object is redefined.
For the future FWH version, please note that your rpreview.prg is still doing a SetBrush() after the first oSay definition, which I think it should be no more needed.

Thank you.
Davide.

P.S.: BTW, is it possible to put a text inside a buttonbar instead/in addition to the image ?
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Postby Antonio Linares » Sun Apr 02, 2006 11:07 am

Davide,

>
BTW, is it possible to put a text inside a buttonbar instead/in addition to the image ?
>

Yes, but the problem is that Windows automatically calculates the width required for the text and assigns the same width to all the buttons.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Davide » Sun Apr 02, 2006 11:16 am

Antonio,
Antonio Linares wrote:Davide,

>
BTW, is it possible to put a text inside a buttonbar instead/in addition to the image ?
>

Yes, but the problem is that Windows automatically calculates the width required for the text and assigns the same width to all the buttons.

Uhm, I understand. And what about placing those buttons into an additional toolbar on the same Window ?
BTW, is there any sample about a button with text ?
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Postby Antonio Linares » Sun Apr 02, 2006 11:19 am

Davide,

The solution would be to use a TReBar and use several toolbars. One with the combobox, and another with one single button with the text and no image.

You may review samples\ToolBar1.prg and ToolBar2.prg.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42111
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Davide » Sun Apr 02, 2006 11:38 am

Antonio,

> You may review samples\ToolBar1.prg and ToolBar2.prg.

thank you. I don't know why I didn't find them before!.

Hi,
Davide.
Davide
 
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 69 guests