Difference between revisions of "Hide Method"

From Lianjapedia
Jump to: navigation, search
(Created page with '{{Common Method}} Category:Methods Category:Common Methods')
 
 
Line 1: Line 1:
{{Common Method}}
+
__NOTOC__
 +
Makes the object invisible.
 +
 
 +
<pre>
 +
ob.hide
 +
</pre>
 +
 
 +
==Example==
 +
<code lang="recital">
 +
//
 +
// Lianja custom section for page "page1" section "section1"
 +
//
 +
namespace custom1
 +
public textbox1, textbox2
 +
define class page1_section1 as section
 +
enddefine
 +
 +
define class showhide_button as CommandButton
 +
proc click
 +
&(iif(textbox1.visible,"textbox1.hide","textbox1.show"))
 +
&(iif(textbox2.visible,"textbox2.hide","textbox2.show"))
 +
endproc
 +
enddefine
 +
 +
proc page1_section1
 +
page1_section1 = createobject("page1_section1")
 +
 +
page1_section1.addobject("showhidebutton","showhide_button")
 +
showhidebutton.caption = "Show/Hide Toggle"
 +
 +
page1_section1.addobject("textbox1", "Textbox")
 +
textbox1.value = "Textbox 1"
 +
textbox1.backcolor = "orange"
 +
 +
page1_section1.addobject("textbox2", "Textbox")
 +
textbox2.value = "Textbox 2"
 +
textbox2.backcolor = "gray"
 +
textbox2.visible = False
 +
return page1_section1
 +
</code>
  
 
[[Category:Methods]]
 
[[Category:Methods]]
 
[[Category:Common Methods]]
 
[[Category:Common Methods]]

Latest revision as of 05:40, 28 September 2011

Makes the object invisible.

ob.hide

Example

//
// Lianja custom section for page "page1" section "section1"
//
namespace custom1
public textbox1, textbox2
define class page1_section1 as section
enddefine
 
define class showhide_button as CommandButton
	proc click
		&(iif(textbox1.visible,"textbox1.hide","textbox1.show"))
		&(iif(textbox2.visible,"textbox2.hide","textbox2.show"))
	endproc
enddefine
 
proc page1_section1 
	page1_section1 = createobject("page1_section1")
 
	page1_section1.addobject("showhidebutton","showhide_button")
	showhidebutton.caption = "Show/Hide Toggle"	
 
	page1_section1.addobject("textbox1", "Textbox")
	textbox1.value = "Textbox 1"
	textbox1.backcolor = "orange"
 
	page1_section1.addobject("textbox2", "Textbox")
	textbox2.value = "Textbox 2"
	textbox2.backcolor = "gray"
	textbox2.visible = False
return page1_section1