V4RB, how to create StaticText in code

keatk at comcast.net keatk at comcast.net
Wed May 26 19:49:01 CDT 2004


> Yes, I want 
> 
>     to have empty window "Properties"
>     or with one pair of static text
> 
> Then add as many as I need.
> 
> 
>     StaticText      StaticText
> 
>     ........        ...........
> 
>     ........        ...........
> 
> 
> So I need clone it?
> 
> Exists such function?

Yes... I've not done it for awhile , but from memory:

 Let's say you have one statictext for each colu,m named:
StaticText1,  StaticText2, StaticText3 ...

For each of them set their Index properties to 1

Then in Code to come them do:

Dim NewStaticText as StaticText

NewStaticText = New StaticText1
NewStaticText.Top = whatever
NewStaticText.left = whaterver
NewStaticText..text = "Whatever"


NewStaticText = New StaticText2
NewStaticText.Top = whatever
NewStaticText.left = whaterver
NewStaticText..text = "Whatever"



Of course you can use loops...

- karen


> On 5/26/04 9:41 PM, "Charles Yeomans" <yeomans at desuetude.com> wrote:
> 
> > On May 26, 2004, at 2:30 PM, Ruslan Zasukhin wrote:
> > 
> >> 
> >> Is it possible in REALbasic ?
> >> 
> >> I think yes, but cannot make it working.
> > 
> > It depends on what you mean; you can clone a StaticText in a window,
> > but this is the only way to create controls at runtime.
> 
> Ugly.
> 
> Yes, I want 
> 
>     to have empty window "Properties"
>     or with one pair of static text
> 
> Then add as many as I need.
> 
> 
>     StaticText      StaticText
> 
>     ........        ...........
> 
>     ........        ...........
> 
> 
> So I need clone it?
> 
> Exists such function?
> 
> 
> -- 
> Best regards,
> Ruslan Zasukhin      [ I feel the need...the need for speed ]
> -------------------------------------------------------------
> e-mail: ruslan at paradigmasoft.com
> web: http://www.paradigmasoft.com
> 
> To subscribe to the Valentina mail list go to:
> http://lists.macserve.net/mailman/listinfo/valentina
> -------------------------------------------------------------
> 
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina


More information about the Valentina mailing list