How to get 2 lines for button

How to get 2 lines for button

Postby acwoo1 » Mon Apr 11, 2011 4:09 am

Hi,

@ 10, 20 BUTTON obtn3i PROMPT "Payment" + CRLF + "Voucher" OF oWnd ACTION pvouch2(cDirect1);
SIZE 100, 44

The above appear only in one line. How to get 2 lines.

Thanks
acwwo
using FWH113+harbour+bcc582
acwoo1
 
Posts: 173
Joined: Tue Nov 10, 2009 10:56 am

Re: How to get 2 lines for button

Postby Robert Frank » Mon Apr 11, 2011 6:33 am

Try to do it with SBUTTON

Image
Last edited by Robert Frank on Mon Apr 11, 2011 6:58 am, edited 1 time in total.
Robert Frank
User avatar
Robert Frank
 
Posts: 95
Joined: Fri Nov 23, 2007 4:43 am
Location: Gdynia-Poland

Re: How to get 2 lines for button

Postby Richard Chidiak » Mon Apr 11, 2011 6:52 am

This is an example (from Enrico)

#define BS_MULTILINE 8192

@ 1, 1 BUTTON oBtn PROMPT "&Close" + CHR( 13 ) + "the dialog";
SIZE 50, 30;
ACTION oDlg:End()

oBtn:nStyle = NOR( oBtn:nStyle, BS_MULTILINE )

Hth

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: How to get 2 lines for button

Postby hua » Mon Apr 11, 2011 7:54 am

If you'll be using resources, just check the MultiLine property of the button in the resource workshop
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1070
Joined: Fri Oct 28, 2005 2:27 am

Re: How to get 2 lines for button

Postby acwoo1 » Tue Apr 12, 2011 3:30 am

Thanks for the help

#define BS_MULTILINE 8192

@ 1, 1 BUTTON oBtn PROMPT "&Close" + CHR( 13 ) + "the dialog";
SIZE 50, 30;
ACTION oDlg:End()

oBtn:nStyle = NOR( oBtn:nStyle, BS_MULTILINE )


does not work. Still appear in one line.

Regards
acwoo
acwoo1
 
Posts: 173
Joined: Tue Nov 10, 2009 10:56 am

Re: How to get 2 lines for button

Postby Enrico Maria Giordano » Tue Apr 12, 2011 9:56 am

This is a working sample:

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8568
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to get 2 lines for button

Postby acwoo1 » Tue Apr 12, 2011 10:34 am

Thanks For Your Help

#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
******************************
Still one line.

Regards
acwoo
acwoo1
 
Posts: 173
Joined: Tue Nov 10, 2009 10:56 am

Re: How to get 2 lines for button

Postby Enrico Maria Giordano » Tue Apr 12, 2011 11:04 am

Did you want my EXE to test it there? If yes, send me an email.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8568
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to get 2 lines for button

Postby acwoo1 » Tue Apr 12, 2011 12:33 pm

Thanks for your help

I tested it. It runs OK with two lines.
But if I put in:
skinbuttons()

Then, it becomes one line.

Thanks

Regards
acwoo
acwoo1
 
Posts: 173
Joined: Tue Nov 10, 2009 10:56 am

Re: How to get 2 lines for button

Postby Enrico Maria Giordano » Tue Apr 12, 2011 1:29 pm

I can't help you regarding skinbuttons(), sorry.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8568
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to get 2 lines for button

Postby Horizon » Tue Apr 12, 2011 2:40 pm

Hi,

You can use BTNBMP instead of BUTTON. It works multiple line. But, I have not tried with SkinButton()
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1305
Joined: Fri May 23, 2008 1:33 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 51 guests