DcPushbutton Wordbreak

Xbase++ 2.0 Build 554 or later
Post Reply
Message
Author
User avatar
jdsoft
Posts: 113
Joined: Thu Jan 28, 2010 1:13 pm
Location: Overberg
Contact:

DcPushbutton Wordbreak

#1 Post by jdsoft »

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

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: DcPushbutton Wordbreak

#2 Post by Tom »

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: 129
Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland

Re: DcPushbutton Wordbreak

#3 Post by Piotr D »

Hi,
@1,2 DCPUSHBUTTON CAPTION 'First Second' ALIGNCAPTION BS_MULTILINE

Regards
Piotr

Piotr D
Posts: 129
Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland

Re: DcPushbutton Wordbreak

#4 Post by Piotr D »

Or
@1,2 DCPUSHBUTTON CAPTION 'First;Second' ALIGNCAPTION BS_MULTILINE

Piotr

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: DcPushbutton Wordbreak

#5 Post by Tom »

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: 129
Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland

Re: DcPushbutton Wordbreak

#6 Post by Piotr D »

Tom,
Without a semicolon, the text will break automatically when the button size is reached.

Regards
Piotr

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DcPushbutton Wordbreak

#7 Post by rdonnay »

@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.

User avatar
jdsoft
Posts: 113
Joined: Thu Jan 28, 2010 1:13 pm
Location: Overberg
Contact:

Re: DcPushbutton Wordbreak

#8 Post by jdsoft »

Hello,

Thank you !
I was not aware of the ALIGNCAPTION BS_MULTILINE.
This does exactly what i need.
Regards,
Jack Duijf

Post Reply