Cambio FONT su prompts di un FOLDER

Moderator: Enrico Maria Giordano

Post Reply
User avatar
max
Posts: 122
Joined: Fri Jun 30, 2006 2:14 pm
Location: Ancona - Italy

Cambio FONT su prompts di un FOLDER

Post by max »

Non riesco a cambiare il font dei prompt di una folder creata da sorgente.
Ho scritto così, ma il font rimane sempre quello di default:

local oDLG, oFLD,fntArial
DEFINE FONT fntArial NAME "Arial" SIZE 0, -20
DEFINE DIALOG odlg FROM 1,1 to 45,125 TITLE "Prova dialog"
@ 1,1 FOLDER oFLD PROMPTS "PRIMA","SECONDA" SIZE 460,300 PIXEL FONT fntArial
ACTIVATE DIALOG oDlg CENTERED

Solo se lo associo alla dialog oDLG allora cambia, ma a quel punto mi cambia tutta la dialog e non solo i prompt del folder come vorrei.
Ho anche provato con il
SET FONT OF oFLD:aprompts[1] TO fntArial ,

ma nulla da fare (errore in runtime).

Dove sbaglio?
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Max,

Code: Select all

#include "FiveWin.ch"

function Main()   

   local oDLG, oFLD, fntArial 

   DEFINE FONT fntArial NAME "Arial" SIZE 0, -20 

   DEFINE DIALOG odlg FROM 1,1 to 45,125 TITLE "Prova dialog" 

   @ 1, 1 FOLDER oFLD PROMPTS "PRIMA","SECONDA" SIZE 460,300 PIXEL

   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT oFld:SetFont( fntArial )

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
max
Posts: 122
Joined: Fri Jun 30, 2006 2:14 pm
Location: Ancona - Italy

Post by max »

ok, grazie!
But where i can find a documentation updated with all methods that i can use for each object?
Now during my work i search in examples \fwh\samples\ and in documentation file *.chm in \fwh\manual, but (for example) i have not find this methods you wrote ( ofld:setfont(), that works fine ) in this documentation...

Or is better asking in the forum?
Thank you.

MT

FWH 8.04 + XHARBOUR 1.1.0
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Max,

You are welcome to ask in these forums for any help that you may need.

The Method SetFont() belongs to Class TWindow. From TWindow, Class TControl is inherited, and from TControl, Class TFolder is inherited. So Class TFolder has inherited Method SetFont() too.

Its a good practice to review the FiveWin source code to get a good understanding about its object oriented design.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply