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.itThe EMG's ZX-Spectrum Page:
http://www.emagsoftware.it/spectrumThe Best of Spectrum Games:
http://www.emagsoftware.it/tbosg