Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Font controls in form
Message
 
 
To
31/01/2011 14:15:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01497898
Message ID:
01498031
Views:
36
If you're doing your forms in code, you need to create a form's class and add this code
procedure Init
dodefault()
code to set option's font
endproc

I suggest to start creating your forms visually, as fixing forms using this generated code is too cumbersome and contr-productive.

>got some funny error messages there. are you suggesting at point directly after createobject?
>or after define class? both met with resistance. tnx naomi
>k
>
>>Are you still building your forms using code rather than form's designer?
>>
>>In any case, try adding code in the form's Init
>>
>>for each loOption in thisform.opgMyOptGrp.Options
>>   loOption.FontName = 'Arial'
>>   loOption.FontSize = 12
>>next
>>
>>this is from the top of my head, so may need some adjusting.
>>
>>>i am trying to change the font of my form and seem only to achieve control of the text above theoption buttons.
>>>Can you please tell me how to fix this
>>>thanks k
>>>
>>>
>>>frmMyForm = Createobject('Form')  && Create a Form
>>>frmMyForm.Closable = .F.  && Disable the window pop-up menu
>>>frmMyForm.BorderStyle = 3
>>>frmMyForm.FontSize=10  && this will apply only to text above the option group
>>>frmMyForm.AddObject('cmdCommand1','cmdMyCmndBtn')  && Add Command button
>>>frmMyForm.AddObject('opgOptionGroup1','opgMyOptGrp') && Add Option Group
>>>
>>>
>>>i had assumed the font controls (type size) went into the group definition
>>>
>>>
>>>Define Class opgMyOptGrp As OptionGroup  && Create an Option Group
>>>	ButtonCount = 13 && number of Option buttons
>>>	Top = 22
>>>	Left = 14
>>>	Height = 275
>>>	Width = 243
>>>                    fontsize = 12 &&&& this has no effect
>>>                   font = "Arial"   &&& this has no effect
>>>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform