|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Dynamic Control Positioningincreamental 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? 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? > > > 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? >> >> >> 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? >> >> >>
Child control designers
Making ASP.NET 2.0 asp:Wizard control fully Navigatable without mo Defining a ControlParameter of type DateTime for a DataSource InsertItemTemplate dependant dropdown list problem Disable Validator through Client-Site code Custom Datagrid not displaying Reading / Modifying FormView Child Controls at Runtime Custom Controls with UI Designer System.Web.UI.Design namespace not found ServerControl With URL Property to open a dialog box not working |
|||||||||||||||||||||||