Ho una dialog abbastanza complessa con numerosi oggetti testo statici (say) scritti su una risorsa esterna attraverso workshop.
Ad alcuni di questi vorrei dare un certo font per evidenziarli dagli altri.
C'è un modo più semplificato che non procedere uno per uno con la REDEFINE, così come ho fatto finora? (vedi sotto)
local fnt1,oDLG,oSAY1,oSAY2,oSAY3,...., oSAY100
REDEFINE oSAY1 ID 1 of oDLG FONT fnt1
REDEFINE oSAY2 ID 2 of oDLG FONT fnt1
REDEFINE oSAY3 ID 3 of oDLG FONT fnt1
....
...
REDEFINE oSAY100 ID 100 of oDLG FONT fnt1
MT
FWH 8.04 - XHARBOUR 1.1.0
cambio font su molteplici oggetti "say"
Moderator: Enrico Maria Giordano
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Antonio,
ok i can specify one font in my resource, but i need to declare one font not for all may object say but only just for some of them.
And another font for other type of say , ecc.ecc.
And if i don't wrong in the resource editor i can specify only one font, valid for all objects and controls of the dialogbox.
Or there is a syntax in the resource editor for declaring multiple font in the same dialogbox, assigning one font to each control?
Thank you.
bye
Max
ok i can specify one font in my resource, but i need to declare one font not for all may object say but only just for some of them.
And another font for other type of say , ecc.ecc.
And if i don't wrong in the resource editor i can specify only one font, valid for all objects and controls of the dialogbox.
Or there is a syntax in the resource editor for declaring multiple font in the same dialogbox, assigning one font to each control?
Thank you.
bye
Max
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Max,
To use different fonts you have to do it programmatically:
To use different fonts you have to do it programmatically:
Code: Select all
ACTIVATE DIALOG oDlg ;
ON INIT SetDifferentFonts( oDlg )
...
function SetDifferentFonts( oDlg )
local n
for n = 1 to Len( oDlg:aControls )
do case
case Upper( oDlg:aControls[ n ]:ClassName() ) == "TSAY"
oDlg:aControls[ n ]:SetFont( oFontForSays )
...
endcase
next
return nil