I am using the font dialogue box qfontdialogue how to do I test for condition if user clicks on bold,italic etc do something?
This is the line of code I have done so far.
if fontdialog.AddStyles (fsBold) = true then print "bold"
but it dons't work. Can anybody please help. Thanks.
2. Re: Please help
#1003
Posted by: 2003-06-18 02:51:46
'Excuse me for my english (I'm french).... 'You must use the QFONT composant :
DECLARE SUB Gras DIM font1 AS QFONT
CREATE Form1 AS QFORM center CREATE Button1 AS QBUTTON OnClick = Gras Caption = "BOLD" END CREATE CREATE RichEdit1 AS QRICHEDIT top = button1.height text = ";) Cool !!!" font = font1 END CREATE END CREATE Form1.ShowModal
SUB Gras font1.AddStyles (ftBold) RichEdit1.font = font1 END SUB
3. Re: Please help
#1004
Posted by: 2003-06-18 03:25:27
Thanks but thats not quite what I meant, I am writing an HTML editor and need a a way for the user to select a fonts, I am using the qfontdialogue box but how do I get the program to do somthing when the user clicks on bold within the font dialogue box?