How to create a multiline button?
How to create a multiline button?
Any code available to create a multiline button?
Useing resources..Borland workshop.
Thanks
Useing resources..Borland workshop.
Thanks
Thank you
Harvey
Harvey
Re: How to create a multiline button?
A sample :
REDEFINE BTNBMP oBtn ID 10 OF oFld1:aDialogs[1] 2007 ;
FILENAME c_path + "\Images\select.bmp" ;
LEFT ;
PROMPT " &Select " + CRLF + "Test" ;
FONT oBtnFont ;
ACTION MY_ACTION()
oBtn:lTransparent = .t.
oBtn:cTooltip := { "Select the 1. " + CRLF + "Color for " + CRLF + ;
"Gradient-Design","Color-Select", 1, CLR_BLACK, 14089979 }
Best Regards
Uwe![Laughing :lol:](./images/smilies/icon_lol.gif)
REDEFINE BTNBMP oBtn ID 10 OF oFld1:aDialogs[1] 2007 ;
FILENAME c_path + "\Images\select.bmp" ;
LEFT ;
PROMPT " &Select " + CRLF + "Test" ;
FONT oBtnFont ;
ACTION MY_ACTION()
oBtn:lTransparent = .t.
oBtn:cTooltip := { "Select the 1. " + CRLF + "Color for " + CRLF + ;
"Gradient-Design","Color-Select", 1, CLR_BLACK, 14089979 }
Best Regards
Uwe
![Laughing :lol:](./images/smilies/icon_lol.gif)
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.
i work with FW.
If you have any questions about special functions, maybe i can help.
Re: How to create a multiline button?
Uwe
Thanks for the quick response but not sure the code works with my code
If I change it to:
it doesn't work.
Thanks for the quick response but not sure the code works with my code
Code: Select all | Expand
REDEFINE BUTTON oBtn2 Id 4002 OF ODLG2 ;
action(oDlg2:End())
If I change it to:
Code: Select all | Expand
REDEFINE BUTTON oBtn2 prompt "&select"+CRLF+"test" Id 4002 OF ODLG2 ;
action(oDlg2:End())
it doesn't work.
Thank you
Harvey
Harvey
Re: How to create a multiline button?
We have 3 Button-Classes :
Button
ButtonBMP and
BtnBMP
Class Button doesn't support Linefeed.
For BtnBmp You can use a Resource for Resource-Workshop like:
CONTROL "", 804, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 181, 211, 31, 12
My new Buttontool supports all 3 Styles.
Maybe a good Idea, to support Multiline-Prompts ( Linefeed ) as well.
Best Regards
Uwe![Laughing :lol:](./images/smilies/icon_lol.gif)
Button
ButtonBMP and
BtnBMP
Class Button doesn't support Linefeed.
For BtnBmp You can use a Resource for Resource-Workshop like:
CONTROL "", 804, "TBtnBmp", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 181, 211, 31, 12
My new Buttontool supports all 3 Styles.
Maybe a good Idea, to support Multiline-Prompts ( Linefeed ) as well.
Best Regards
Uwe
![Laughing :lol:](./images/smilies/icon_lol.gif)
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.
i work with FW.
If you have any questions about special functions, maybe i can help.
Re: How to create a multiline button?
Thanks again...I'll try it tomorrow and let you know.
Thank you
Harvey
Harvey
Re: How to create a multiline button?
My Solution for the Tools :
It is easy now, to test Multiline Prompts.
A activated Checkbox will force a CRLF between the 2 Gets,
otherwise the first get is trimmed + 1 char Space + the 2. Get in 1 Line.
![Image](http://www.pflegeplus.com/pictures/Skint11.jpg)
A easy way to test, if Buttonsize, Bitmap and Fontsize work together.
![Image](http://www.pflegeplus.com/pictures/Skint12.jpg)
Best Regards
Uwe![Laughing :lol:](./images/smilies/icon_lol.gif)
It is easy now, to test Multiline Prompts.
A activated Checkbox will force a CRLF between the 2 Gets,
otherwise the first get is trimmed + 1 char Space + the 2. Get in 1 Line.
![Image](http://www.pflegeplus.com/pictures/Skint11.jpg)
A easy way to test, if Buttonsize, Bitmap and Fontsize work together.
![Image](http://www.pflegeplus.com/pictures/Skint12.jpg)
Best Regards
Uwe
![Laughing :lol:](./images/smilies/icon_lol.gif)
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.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Enrico Maria Giordano
- Posts: 8753
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Re: How to create a multiline button?
hag wrote:Any code available to create a multiline button?
This is a working sample:
Code: Select all | Expand
#include "Fivewin.ch"
#define CR CHR( 13 )
#define BS_MULTILINE 8192
FUNCTION MAIN()
LOCAL oDlg, oBtn
DEFINE DIALOG oDlg
@ 1, 1 BUTTON oBtn PROMPT "&Close" + CHR( 13 ) + "the dialog";
SIZE 50, 30;
ACTION oDlg:End()
oBtn:nStyle = NOR( oBtn:nStyle, BS_MULTILINE )
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
EMG
Re: How to create a multiline button?
Enrico,
I wanted to include Your Solution to the other
Tests of the Tools ( Button and ButtonBMP of the ButtonSkin-part ).
Is it possible, to use it for Resources to ?
I don't get it working.
REDEFINE BUTTON oBtn5 PROMPT TRIM(aBTNTEXT[5][1]) + CHR( 13 ) + "Multiline-Test" ID 210 OF oDlg70
oBtn5:oFont := oTextFont
oBtn5:nStyle = NOR( oBtn5:nStyle, BS_MULTILINE )
![Image](http://www.pflegeplus.com/pictures/skint13.jpg)
Best Regards
Uwe![Laughing :lol:](./images/smilies/icon_lol.gif)
I wanted to include Your Solution to the other
Tests of the Tools ( Button and ButtonBMP of the ButtonSkin-part ).
Is it possible, to use it for Resources to ?
I don't get it working.
REDEFINE BUTTON oBtn5 PROMPT TRIM(aBTNTEXT[5][1]) + CHR( 13 ) + "Multiline-Test" ID 210 OF oDlg70
oBtn5:oFont := oTextFont
oBtn5:nStyle = NOR( oBtn5:nStyle, BS_MULTILINE )
![Image](http://www.pflegeplus.com/pictures/skint13.jpg)
Best Regards
Uwe
![Laughing :lol:](./images/smilies/icon_lol.gif)
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.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Enrico Maria Giordano
- Posts: 8753
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Re: How to create a multiline button?
enrico
Thanks for the solution on the multiline button.
Its not working..using borland resources.
You indicated to uwe to add 8192 as a resource style.
Can you explain how to do that.
Went into the text of the dialog to edit style change but can't figure out how to do it on the button.
You additional help woild be appreciated.
Thanks for the solution on the multiline button.
Its not working..using borland resources.
You indicated to uwe to add 8192 as a resource style.
Can you explain how to do that.
Went into the text of the dialog to edit style change but can't figure out how to do it on the button.
You additional help woild be appreciated.
Thank you
Harvey
Harvey
- Enrico Maria Giordano
- Posts: 8753
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Re: How to create a multiline button?
As an example:
EMG
Code: Select all | Expand
PUSHBUTTON "", 201, 10, 10, 65, 40, BS_MULTILINE | WS_TABSTOP
EMG
Re: How to create a multiline button?
Enrico
Perfect.
Needed to edit the rc file outside of borland.
Borland doesn't compile properly with the code you provided.
But it works great.
Thanks again.
Perfect.
Needed to edit the rc file outside of borland.
Borland doesn't compile properly with the code you provided.
But it works great.
Thanks again.
Thank you
Harvey
Harvey
- Enrico Maria Giordano
- Posts: 8753
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Re: How to create a multiline button?
Just use
and it will compile fine.
EMG
Code: Select all | Expand
PUSHBUTTON "", 201, 10, 10, 65, 40, 8192 | WS_TABSTOP
and it will compile fine.
EMG
Re: How to create a multiline button?
Enrico,
with normal ButtonStyle it works fine.
Using a ButtonSkin, it doesn't work.
![Image](http://www.pflegeplus.com/pictures/bskin1.jpg)
![Image](http://www.pflegeplus.com/pictures/bskin2.jpg)
Best Regards
Uwe![Laughing :lol:](./images/smilies/icon_lol.gif)
with normal ButtonStyle it works fine.
Using a ButtonSkin, it doesn't work.
![Image](http://www.pflegeplus.com/pictures/bskin1.jpg)
![Image](http://www.pflegeplus.com/pictures/bskin2.jpg)
Best Regards
Uwe
![Laughing :lol:](./images/smilies/icon_lol.gif)
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.
i work with FW.
If you have any questions about special functions, maybe i can help.