FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to get 2 lines for button
Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
How to get 2 lines for button
Posted: Mon Apr 11, 2011 04: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

Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: How to get 2 lines for button
Posted: Mon Apr 11, 2011 06: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
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: How to get 2 lines for button
Posted: Mon Apr 11, 2011 07: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
Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Re: How to get 2 lines for button
Posted: Tue Apr 12, 2011 03: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

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to get 2 lines for button
Posted: Tue Apr 12, 2011 09:56 AM
This is a working sample:

Code (fw): Select all Collapse
#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
Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Re: How to get 2 lines for button
Posted: 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

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to get 2 lines for button
Posted: Tue Apr 12, 2011 11:04 AM

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

EMG

Posts: 175
Joined: Tue Nov 10, 2009 10:56 AM
Re: How to get 2 lines for button
Posted: 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

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to get 2 lines for button
Posted: Tue Apr 12, 2011 01:29 PM

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

EMG

Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: How to get 2 lines for button
Posted: Tue Apr 12, 2011 02: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.06

Continue the discussion