Page 1 of 1

Say in Toolbar is not transparent.

Posted: Sun Mar 26, 2006 3:43 am
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

Posted: Mon Mar 27, 2006 12:22 pm
by Antonio Linares
Davide,

try this:

FixSays( oBar:hWnd )
oBar:Refresh()

Posted: Mon Mar 27, 2006 4:17 pm
by Davide
Antonio,
Antonio Linares wrote: FixSays( oBar:hWnd )
oBar:Refresh()
it works, and the :SetBrush() is not needed at all.
Thank you,
Davide.

Posted: Sat Apr 01, 2006 3:35 pm
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.

Posted: Sat Apr 01, 2006 4:44 pm
by Antonio Linares
Davide,

You can call FixSays() just once.

Posted: Sat Apr 01, 2006 5:24 pm
by Antonio Linares
Davide,

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

Posted: Sun Apr 02, 2006 10:32 am
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 ?

Posted: Sun Apr 02, 2006 11:07 am
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.

Posted: Sun Apr 02, 2006 11:16 am
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 ?

Posted: Sun Apr 02, 2006 11:19 am
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.

Posted: Sun Apr 02, 2006 11:38 am
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.