IonicWind Software

IWBasic => General Questions => Topic started by: rhuckle on April 26, 2008, 10:47:21 AM

Title: SetFont Problem
Post by: rhuckle on April 26, 2008, 10:47:21 AM
Hi

i have 1 window called w and 3 dialogs called d1, d2 and d3

i tried every method to get the static text within the d1 dialog to set size say to 18 but it remains nomal size if i hoever have font set to the window which is w, the buttons text will change but this is not what im wanting im trying to change the dialog windows only not the window as that does not contain text it is just the container for the dialogs and buttons that open the dialogs

the static text is set via the contol my code is

'Main Window

OPENWINDOW w,0,0,800,600,@size,null,"Main Window",&wproc
CONTROL w,@button,"About",50,530,80,25,@tabstop,1
CONTROL w,@button,"Links",150,530,80,25,@tabstop,2
CONTROL w,@button,"Compiler",250,530,80,25,@tabstop,3
CONTROL w,@button,"Exit",660,530,80,25,@tabstop,4

'Create Dialogs

CREATEDIALOG d1,10,10,762,500,null,w,"About",&d1handler
CONTROL d1,@button,"Close",50,430,80,25,@tabstop,5
CONTROL d1,@STATIC,"TEST",10,10,80,25,@tabstop,STATIC_1
'SetFont d1, "Arial",18,400,0,STATIC_1

CREATEDIALOG d2,10,10,762,500,null,w,"Links",&d2handler
CONTROL d2,@button,"Close",50,430,80,25,@tabstop,6

CREATEDIALOG d3,10,10,762,500,null,w,"Compiler",&d3handler
CONTROL d3,@button,"Close",50,430,80,25,@tabstop,7

Regards

Ricky H
Title: Re: SetFont Problem
Post by: Ionic Wind Support Team on April 26, 2008, 10:54:37 AM
The dialog and controls are not really created until DoModal or ShowDialog is called.  You initialize your controls, including changing their fonts, in reponse to the @IDINITDIALOG message in your handler.

This is outlined in the users guide btw.

Paul.
Title: Re: SetFont Problem
Post by: rhuckle on April 27, 2008, 12:39:02 AM
thanks for that once i saw the @IDINITDIALOG i searched the help file and found what i needed and got what i was wanting to succeed thanks for that