Split Text on Button Prompt

Split Text on Button Prompt

Postby Rick Lipkin » Thu Jan 31, 2013 11:00 pm

To All

Very rarely do I use standard 'push buttons' but I am doing a 'retro' look with xp themes and the old button style looks pretty good.

Just curious how you can split the Prompt text of a button in to two rows .. this code does not work ..

Rick Lipkin

Code: Select all  Expand view

 REDEFINE BUTTON oBtn6 Prompt "Tier"+CRLF+"Summ" ID 117 of oMieA ;
            ACTION ( _MieRate( oWndMDI,@oWndChildB ) )
 


Image
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Split Text on Button Prompt

Postby ukoenig » Thu Jan 31, 2013 11:09 pm

Rick,

instead of class TButton, You can change to :

REDEFINE BTNBMP oBtn[1] OF oDlg ;
ID 140 PIXEL 2007 ;
NOBORDER ;
PROMPT " &Print" + CRLF + "1. Image" ;
FILENAME c_path1 + "Print.Bmp" ;
ACTION ( IMGREPORT( 1, 1 ) ) ;
FONT oFont1 ;
LEFT
oBtn[1]:lTransparent := .t.
oBtn[1]:cToolTip = { "Print" + CRLF + "selected Images","Print", 1, CLR_BLACK, 14089979 }
oBtn[1]:SetColor( 0, )

Best regards
Uwe :lol:
Last edited by ukoenig on Thu Jan 31, 2013 11:51 pm, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Split Text on Button Prompt

Postby Marcelo Via Giglio » Thu Jan 31, 2013 11:31 pm

Marcelo Via Giglio
 
Posts: 1064
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

Re: Split Text on Button Prompt

Postby Franklin Demont » Fri Feb 01, 2013 10:51 am

Rick ,

From code
Code: Select all  Expand view

  #define BS_MULTILINE 8192
@ 142 ,90 BUTTON oButIns PROMPT "test" OF oDlg PIXEL SIZE 40 , 25;
oButIns:nStyle  := NOR( oButIns:nStyle, BS_MULTILINE )

From resources 8192 , in rc

PUSHBUTTON "Technische fiche (Excel)", 425, 10 , 33 , 40 , 22 , 8192

 
test
Franklin Demont
 
Posts: 166
Joined: Wed Aug 29, 2012 8:25 am

Re: Split Text on Button Prompt

Postby Rick Lipkin » Fri Feb 01, 2013 2:06 pm

Franklin

Thank you .. 8192 was the trick .. added to the PUSHBUTTON line in the .rc

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 106 guests