Xbase++ 2.0 Build 554 or later
jdsoft
Posts: 116 Joined: Thu Jan 28, 2010 1:13 pm
Location: Overberg
Contact:
#1
Post
by jdsoft » Mon Dec 21, 2020 3:06 am
I try to get WordBreak in DCPUSHBUTTON.
Already tryed:
Code: Select all
LOCAL cBtnLabel := "First;Second"
@ 1, 1 DCPUSHBUTTON CAPTION cBtnLabel SIZE 15,5
and
Code: Select all
LOCAL cBtnLabel := "First" + Chr(10 + Chr(13) + "Second"
@ 1, 1 DCPUSHBUTTON CAPTION cBtnLabel SIZE 15,5
and
Code: Select all
LOCAL cBtnLabel := "First Second"
LOCAL aBtnPres := {{XBP_PP_ALIGNMENT,XBPALIGN_WORDBREAK}}
@ 1, 1 DCPUSHBUTTON CAPTION cBtnLabel SIZE 15,5 PRESENTATION aBtnPres
No success until now.
What is my mistake?
Regards,
Jack Duijf
Tom
Posts: 1205 Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany
#2
Post
by Tom » Mon Dec 21, 2020 3:43 am
Did this ever work with standard buttons? I remember I changed buttons to DCPUSHBUTTONXP (ownerdrawing) to get this going, and then I removed it, since two-line-buttons don't look good.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Piotr D
Posts: 131 Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland
#3
Post
by Piotr D » Mon Dec 21, 2020 5:08 am
Hi,
@1,2 DCPUSHBUTTON CAPTION 'First Second' ALIGNCAPTION BS_MULTILINE
Regards
Piotr
Piotr D
Posts: 131 Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland
#4
Post
by Piotr D » Mon Dec 21, 2020 5:16 am
Or
@1,2 DCPUSHBUTTON CAPTION 'First;Second' ALIGNCAPTION BS_MULTILINE
Piotr
Tom
Posts: 1205 Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany
#5
Post
by Tom » Mon Dec 21, 2020 5:21 am
Code: Select all
@1,2 DCPUSHBUTTON CAPTION 'First;Second' SIZE 10,2 ALIGNCAPTION BS_MULTILINE
You forgot the semicolon, which is needed to get this working. And it works.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Piotr D
Posts: 131 Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland
#6
Post
by Piotr D » Mon Dec 21, 2020 5:51 am
Tom,
Without a semicolon, the text will break automatically when the button size is reached.
Regards
Piotr
rdonnay
Site Admin
Posts: 4775 Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:
#7
Post
by rdonnay » Mon Dec 21, 2020 7:40 am
@1,2 DCPUSHBUTTON CAPTION 'First;Second' SIZE 10,2 ALIGNCAPTION BS_MULTILINE
I don't think I ever used that feature and may not have been aware of that.
Yes, it does work very well.
The eXpress train is coming - and it has more cars.
jdsoft
Posts: 116 Joined: Thu Jan 28, 2010 1:13 pm
Location: Overberg
Contact:
#8
Post
by jdsoft » Mon Dec 21, 2020 8:48 am
Hello,
Thank you !
I was not aware of the ALIGNCAPTION BS_MULTILINE.
This does exactly what i need.
Regards,
Jack Duijf