Difference between revisions of "Minwidth Property"
From Lianjapedia
Yvonne.milne (Talk | contribs) (Created page with '__NOTOC__ The minimum width of the object in pixels. Read/write. The width of an object is dependent on the width available in the parent container. Minwidth can be used to spe…') |
Yvonne.milne (Talk | contribs) |
||
Line 8: | Line 8: | ||
</pre> | </pre> | ||
− | === | + | ===nMinwidth=== |
Numeric signifying the minimum width in pixels. | Numeric signifying the minimum width in pixels. | ||
Revision as of 08:35, 12 April 2011
The minimum width of the object in pixels. Read/write. The width of an object is dependent on the width available in the parent container. Minwidth can be used to specify a width below which the object will not resize.
nMinwidth = ob.minwidth ob.minwidth = nMinwidth
nMinwidth
Numeric signifying the minimum width in pixels.
Example
// // Lianja custom section for page "page1" section "section1" // namespace custom1 public textbox1, textbox2, sizebutton define class page1_section1 as section enddefine define class size_button as CommandButton proc click // Shrink container size container1.fixedwidth = 400 // Textbox1 stays at fixedwidth textbox1.value = "Width = " + etos(int(textbox1.width)) // Textbox2 does not go below its minimum width textbox2.value = "Width = " + etos(int(textbox2.width)) // Sizebutton resizes to fill the rest of the available container width sizebutton.caption = "Width = " + etos(int(sizebutton.width)) endproc enddefine proc page1_section1 page1_section1 = createobject("page1_section1") page1_section1.addobject("container1","container") container1.backcolor = "slategray" // Arrange objects horizontally in container container1.layout = 1 container1.addobject("textbox1", "Textbox") textbox1.value = "Fixed width 120" textbox1.fixedwidth = 120 container1.addobject("textbox2", "Textbox") textbox2.value = "Min width 200" textbox2.minwidth = 200 container1.addobject("sizebutton","size_button") sizebutton.caption = "Click" return page1_section1