Say in Toolbar is not transparent.

Post Reply
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Say in Toolbar is not transparent.

Post by Davide »

Hello guys.

As subject, for example in rpreview.prg:

Code: Select all

     @ 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Davide,

try this:

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

Antonio Linares
www.fivetechsoft.com
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Post by Davide »

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

Post by Davide »

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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Davide,

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

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

Post by Antonio Linares »

Davide,

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

Antonio Linares
www.fivetechsoft.com
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Post by Davide »

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 ?
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Post by Davide »

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 ?
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Post by Davide »

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.
Post Reply