Difference between revisions of "Refresh Method"

From Lianjapedia
Jump to: navigation, search
(Created page with '{{Common Method}} Category:Methods Category:Common Methods')
 
 
Line 1: Line 1:
{{Common Method}}
+
__NOTOC__
 +
Forces a repaint of the object.  Generally handled automatically when changes are made to the object's properties.
 +
 
 +
<pre>
 +
ob.refresh
 +
</pre>
 +
 
 +
==Example==
 +
<code lang="recital">
 +
//
 +
// Lianja custom section for page "page1" section "section1"
 +
//
 +
namespace custom1
 +
public textbox1, textbox2, textbox3
 +
define class page1_section1 as section
 +
enddefine
 +
 +
define class refresh_button as CommandButton
 +
proc click
 +
textbox1.text = "Refreshed"
 +
                // Refresh not required
 +
textbox1.refresh
 +
endproc
 +
enddefine
 +
 +
proc page1_section1
 +
page1_section1 = createobject("page1_section1")
 +
 +
page1_section1.addobject("refreshbutton","refresh_button")
 +
refreshbutton.caption = "Refresh Textbox 1"
 +
 +
page1_section1.addobject("textbox1", "Textbox")
 +
textbox1.text = "Textbox 1"
 +
 +
return page1_section1
 +
</code>
  
 
[[Category:Methods]]
 
[[Category:Methods]]
 
[[Category:Common Methods]]
 
[[Category:Common Methods]]

Latest revision as of 08:38, 29 September 2011

Forces a repaint of the object. Generally handled automatically when changes are made to the object's properties.

ob.refresh

Example

//
// Lianja custom section for page "page1" section "section1"
//
namespace custom1
public textbox1, textbox2, textbox3
define class page1_section1 as section
enddefine
 
define class refresh_button as CommandButton
	proc click
		textbox1.text = "Refreshed"
                // Refresh not required
		textbox1.refresh
	endproc
enddefine
 
proc page1_section1 
	page1_section1 = createobject("page1_section1")
 
	page1_section1.addobject("refreshbutton","refresh_button")
	refreshbutton.caption = "Refresh Textbox 1"
 
	page1_section1.addobject("textbox1", "Textbox")
	textbox1.text = "Textbox 1"
 
return page1_section1