Page 1 of 1

Cambio FONT su prompts di un FOLDER

PostPosted: Mon Sep 01, 2008 5:29 pm
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?

PostPosted: Mon Sep 01, 2008 7:24 pm
by Antonio Linares
Max,

Code: Select all  Expand view
#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

PostPosted: Tue Sep 02, 2008 10:18 am
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

PostPosted: Tue Sep 02, 2008 11:14 am
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.