Toolbar prompts on two rows

Toolbar prompts on two rows

Postby Marco Turco » Tue Dec 13, 2005 11:51 am

Hello,
is there a way to make the toolbar prompts on two rows ?

Due to the lenght of my prompt text I can only display a small number of buttons.

Thanks in advance

Best Regards,
Marco
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Postby Antonio Linares » Tue Dec 13, 2005 11:59 am

Marco,

Are you using Win32 toolbars ? If so, have you tried to use CRLF to break the prompt into multiple lines ?
regards, saludos

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

Postby Marco Turco » Tue Dec 13, 2005 2:03 pm

Yes I Did but it doesn't run.
The prompt appairs always on a single row and the CRLF appair as a not recognized chars (two small box)

Marco
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Postby Antonio Linares » Tue Dec 13, 2005 6:27 pm

Marco,

It looks as it is not supported. We are going to search for more info.
regards, saludos

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

Postby Brian Hays » Tue Dec 13, 2005 10:13 pm

You need to send a msg to the toolbar hwnd. For 2 rows of text:

nRows := 2
SendMessage( oTBar:hWnd, TB_SETMAXTEXTROWS, nRows, 0 )
-BH
Brian Hays
 
Posts: 20
Joined: Fri Oct 14, 2005 7:56 am

Postby Antonio Linares » Wed Dec 14, 2005 8:02 am

Brian,

Thanks a lot for your help,
regards, saludos

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

Postby Marco Turco » Wed Dec 14, 2005 2:05 pm

Hi Brian,
thanks you for your email.

I tried with the toolbar1.prg FW's sample but it doesn't runs.
Could you pls.send me a working sample ?

Thanks in advance.

Marco
User avatar
Marco Turco
 
Posts: 858
Joined: Fri Oct 07, 2005 12:00 pm
Location: London

Postby Brian Hays » Wed Dec 14, 2005 9:23 pm

well unfortunately I have an extremely hacked toolbar class that isn't safe for public consumption. There were too many glitches getting it to work generically for Antonio, and I had a deadline I had to make so it's currently specific to our usage.
You can test the return value from that call to see if it succeeded. It may not show changes until you follow it with:
SendMessage( ::hWnd, TB_AUTOSIZE, 0, 0 )
If it's an MDI app, there was also a problem with the oWndClient needing to be resized to allow the TBar and Rebar to expand.
-BH
Brian Hays
 
Posts: 20
Joined: Fri Oct 14, 2005 7:56 am

Postby Antonio Linares » Fri Dec 16, 2005 9:43 am

Brian,

Do you use Chr( 13 ) + Chr( 10 ) (CRLF) to break the text line ?
regards, saludos

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

Postby Brian Hays » Fri Dec 16, 2005 10:40 am

No. I'll have to go back and review to find out the trick. We opted NOT to do 2 rows. Part of the problem is the standard style expands the buttons to the width of the widest string. You have to tell it to stop doing that, but I don't remember exactly how. It's not as easy as just adding the CCS_NORESIZE style.
TB_SETMAXTEXTROWS just tells it to ALLOW more than one row.....
[/quote]
-BH
Brian Hays
 
Posts: 20
Joined: Fri Oct 14, 2005 7:56 am


Return to FiveWin for Harbour/xHarbour

Who is online

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