Button , text on two lines

Button , text on two lines

Postby Frank Demont » Wed Oct 04, 2006 2:34 pm

Hello

Is it possible to have a button , where the text (cCaption) is locatedt in two rows ?

I tryed with :

Code: Select all  Expand view
@ 1,18 BUTTON "Kies inputtype en " + CRLF + "klik om verder te gaan"   OF oDlg ACTION (lOk := .T. , oDlg:end()) SIZE 110 , 28


No succes

Frank
Frank Demont
 
Posts: 142
Joined: Sun Oct 09, 2005 10:59 am

Postby James Bott » Wed Oct 04, 2006 2:45 pm

Frank,

Here are some previous messages about that.

James


From: André Venturini Scaravelli <andrevs@theway.com.br>
Subject: 2 rows in button's caption
Date: Thursday, December 21, 2000 4:16 PM

Hi,
Can a button's caption has 2 rows?

Add to Style Button the number 8192
----------------------------
#define CR Chr( 13 )
//
FUNCTION uMultLineBtn_Test()

local oDlg, oBtn
local cCaption := 'Botones con...' + CR + ;
'caption multilínea.-' + CR + ;
'Para conseguirlo basta con emitir la sencilla sentencia...' + CR + ;
'oBtn:nStyle := ' + CR + ;
'nOr( oBtn:nStyle, 8192 )'

DEFINE DIALOG oDlg ;
FROM 00, 00 TO 17, 100 ;
TITLE cCaption

@ 03, 03 BUTTON oBtn PROMPT cCaption ;
OF oDlg ;
SIZE 100, 070

oBtn:nStyle := nOr( oBtn:nStyle, 8192 ) // this works fine!

ACTIVATE DIALOG oDlg CENTERED

RETURN NIL

-------------------------------------------
Here is how to do it with resources:

> I am still looking for a solution which enables me to put 2 (or even more)
> lines of text on a button which is created from a .dll resource. I've tried
> several things but still haven't found a working solution.

You have to:

1. Open your DIALOG resource and go to Edit as text mode.

2. Add the value 8192 at the end of the PUSHBUTTON statement (separate
it by a comma).

3. Inside the ON INIT clause of the DIALOG command use oBtn:cTitle()
method to set the caption of the button (separate the lines by a CHR( 13
)).

That's all.

EMG

--
EMAG Software Homepage: http://www.emagsoftware.it
The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 85 guests