[Gambas-user] Two question on creating a form with controls from code

Willy Raets willy at ...2734...
Sun Aug 26 00:03:59 CEST 2012


On zo, 2012-08-26 at 07:00 +0930, Bruce wrote:
> On Sat, 2012-08-25 at 23:01 +0200, Willy Raets wrote:
> > 1. In IDE you have a form property Scaled (just below resizable) that
> > can be set to True or False (see attached screenshot).
> > When creating a form from code it seems impossible to set the Scaled
> > property. Looked for it in the documentation but can't seem to find
> > anything, or did I miss something?
> > 
> Property Scaled As Boolean
> If the form and controls dimensions must follow the size of the default
> font.
> !	 This property is virtual: it is only implemented in the IDE, and has
> no existence at runtime.

So you mean to say I can't set this property when making the form from
code instead of IDE or am I misunderstanding?

> >Dim FrmTest As New Form
> > Dim lblTest As Label
> > lblTest = New Label(FrmTest)
> > With lblTest
> >    .Height = 20
> >    .Width = 80
> >    .X = 10
> >    .Y = 10
> >    .Text = "Text on Label test"
> >    .Font    '<=== How do I set the font for example to MonoSans, 10 pt?
> > End With
> > 
> > Someone any hints, examples or links to a solution?
> > 
>   Me.Font = Font["Fudd,11"]
> Check the "This class acts like a read-only array." link in the Font
> class help

This works well, thanks. 

Willy
> 
> hth
> Bruce
> 
> 






More information about the User mailing list