Home All Groups Group Topic Archive Search About
Author
7 Feb 2006 4:58 AM
mkhmer
I wanna create a batch of control at runtime and put them all in an
increamental top-down locaiton by detecting the previous Control's "TOP" and
"Height"  property to generate new position for the next control......

But what's seem to be crazy is how can I get that "Height" value? since the
"TOP" value is in numberic (integer) based format while the "Height" value
always return "Unit"  type and can't be operated with integer.....

Got Error: "Operator is not valid for type 'Integer' and type 'Unit'"
==========
NewPosition=LastControl.Height + LastControl.Style("Top") + 30
==========


Got error: "Height is not member of Style....."
========
LastControl.Style("Height")
========

Any idea on this?

Author
7 Feb 2006 3:00 PM
DWS
Mk
Add your controls to a table one per row, the browser will position for you.

Good Luck
DWS


Show quoteHide quote
"mkhmer" wrote:

> I wanna create a batch of control at runtime and put them all in an
> increamental top-down locaiton by detecting the previous Control's "TOP" and
> "Height"  property to generate new position for the next control......
>
> But what's seem to be crazy is how can I get that "Height" value? since the
> "TOP" value is in numberic (integer) based format while the "Height" value
> always return "Unit"  type and can't be operated with integer.....
>
> Got Error: "Operator is not valid for type 'Integer' and type 'Unit'"
> ==========
> NewPosition=LastControl.Height + LastControl.Style("Top") + 30
> ==========
>
>
> Got error: "Height is not member of Style....."
> ========
> LastControl.Style("Height")
> ========
>
> Any idea on this?
>
>
>
Author
8 Feb 2006 1:38 AM
mkhmer
haha.....pretty simple way....why I did not think of this method?

Thank you, DWS !!!


Show quoteHide quote
"DWS" <D**@discussions.microsoft.com> wrote in message
news:FE50D5A9-6439-4024-A594-467D166CE775@microsoft.com...
> Mk
> Add your controls to a table one per row, the browser will position for
> you.
>
> Good Luck
> DWS
>
>
> "mkhmer" wrote:
>
>> I wanna create a batch of control at runtime and put them all in an
>> increamental top-down locaiton by detecting the previous Control's "TOP"
>> and
>> "Height"  property to generate new position for the next control......
>>
>> But what's seem to be crazy is how can I get that "Height" value? since
>> the
>> "TOP" value is in numberic (integer) based format while the "Height"
>> value
>> always return "Unit"  type and can't be operated with integer.....
>>
>> Got Error: "Operator is not valid for type 'Integer' and type 'Unit'"
>> ==========
>> NewPosition=LastControl.Height + LastControl.Style("Top") + 30
>> ==========
>>
>>
>> Got error: "Height is not member of Style....."
>> ========
>> LastControl.Style("Height")
>> ========
>>
>> Any idea on this?
>>
>>
>>
Author
8 Feb 2006 1:42 AM
mkhmer
Hey, DWS!

I am using :

Form.Controls.Add(Control Object)

So how can I define the location of my newly created control? For what you
sugguested, storing it in a table is a good way but how can we tell the
browser to do so?

Now, I can do with absolute position using CSS property:

ControlObject.Style("Top")= XXXpx
ControlObject.Style("Left")=XXX.px

Give me more idea if you don't mind.

Regards,
Show quoteHide quote
"DWS" <D**@discussions.microsoft.com> wrote in message
news:FE50D5A9-6439-4024-A594-467D166CE775@microsoft.com...
> Mk
> Add your controls to a table one per row, the browser will position for
> you.
>
> Good Luck
> DWS
>
>
> "mkhmer" wrote:
>
>> I wanna create a batch of control at runtime and put them all in an
>> increamental top-down locaiton by detecting the previous Control's "TOP"
>> and
>> "Height"  property to generate new position for the next control......
>>
>> But what's seem to be crazy is how can I get that "Height" value? since
>> the
>> "TOP" value is in numberic (integer) based format while the "Height"
>> value
>> always return "Unit"  type and can't be operated with integer.....
>>
>> Got Error: "Operator is not valid for type 'Integer' and type 'Unit'"
>> ==========
>> NewPosition=LastControl.Height + LastControl.Style("Top") + 30
>> ==========
>>
>>
>> Got error: "Height is not member of Style....."
>> ========
>> LastControl.Style("Height")
>> ========
>>
>> Any idea on this?
>>
>>
>>