Difference between revisions of "Resize Method"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (Reverted edits by Helen.george (talk) to last revision by Lianjasupport) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 74: | Line 74: | ||
textbox1.adjustsize | textbox1.adjustsize | ||
textbox2.adjustsize | textbox2.adjustsize | ||
+ | endproc | ||
+ | enddefine | ||
+ | |||
+ | define class autofit_button as CommandButton | ||
+ | proc click | ||
+ | textbox1.autofit | ||
+ | textbox2.autofit | ||
endproc | endproc | ||
enddefine | enddefine | ||
Line 99: | Line 106: | ||
page1_section1.addobject("adjustsizebutton","adjustsize_button") | page1_section1.addobject("adjustsizebutton","adjustsize_button") | ||
− | adjustsizebutton.caption = "Adjust Size to fit contents" | + | adjustsizebutton.caption = "Adjust Size to fit contents (adjustsize)" |
+ | page1_section1.addobject("autofitbutton","autofit_button") | ||
+ | autofitbutton.caption = "Adjust Size to fit contents (autofit)" | ||
+ | |||
page1_section1.addobject("textbox1", "Textbox") | page1_section1.addobject("textbox1", "Textbox") | ||
textbox1.value = "Textbox 1" | textbox1.value = "Textbox 1" |
Latest revision as of 06:26, 30 April 2013
Changes the size of the object.
ob.resize(nWidth, nHeight)
Arguments
Argument | Type | Description |
---|---|---|
nWidth | N | Width |
nHeight | N | Height |
Example
// // Lianja custom section for page "page1" section "section1" // namespace custom1 public textbox1, textbox2 define class page1_section1 as section enddefine define class moveright_button as CommandButton proc click textbox1.move(textbox1.left+10) textbox2.move(textbox2.left+10) endproc enddefine define class moveleft_button as CommandButton proc click textbox1.move(textbox1.left-10) textbox2.move(textbox2.left-10) endproc enddefine define class moveup_button as CommandButton proc click textbox1.move(textbox1.left,textbox1.top-10) textbox2.move(textbox2.left,textbox2.top-10) endproc enddefine define class movedown_button as CommandButton proc click textbox1.move(textbox1.left,textbox1.top+10) textbox2.move(textbox2.left,textbox2.top+10) endproc enddefine define class moveresize_button as CommandButton proc click textbox1.move(textbox1.left,textbox1.top,100,100) textbox2.move(textbox2.left,textbox2.top,100,100) endproc enddefine define class resize_button as CommandButton proc click textbox1.resize(200,50) textbox2.resize(200,50) endproc enddefine define class adjustsize_button as CommandButton proc click textbox1.adjustsize textbox2.adjustsize endproc enddefine define class autofit_button as CommandButton proc click textbox1.autofit textbox2.autofit endproc enddefine proc page1_section1 page1_section1 = createobject("page1_section1") page1_section1.addobject("moverightbutton","moveright_button") moverightbutton.caption = "Move Right" page1_section1.addobject("moveleftbutton","moveleft_button") moveleftbutton.caption = "Move Left" page1_section1.addobject("moveupbutton","moveup_button") moveupbutton.caption = "Move Up" page1_section1.addobject("movedownbutton","movedown_button") movedownbutton.caption = "Move Down" page1_section1.addobject("moveresizebutton","moveresize_button") moveresizebutton.caption = "Resize using move method" page1_section1.addobject("resizebutton","resize_button") resizebutton.caption = "Resize using resize method" page1_section1.addobject("adjustsizebutton","adjustsize_button") adjustsizebutton.caption = "Adjust Size to fit contents (adjustsize)" page1_section1.addobject("autofitbutton","autofit_button") autofitbutton.caption = "Adjust Size to fit contents (autofit)" page1_section1.addobject("textbox1", "Textbox") textbox1.value = "Textbox 1" textbox1.backcolor = "orange" page1_section1.addobject("textbox2", "Textbox") textbox2.value = "Textbox 2" textbox2.backcolor = "gray" return page1_section1