Difference between revisions of "Fontweight Property"

From Lianjapedia
Jump to: navigation, search
Line 3: Line 3:
  
 
<pre>
 
<pre>
nWeight = ob.fontweight
+
nFontWeight = ob.fontweight
ob.fontweight = nWeight
+
ob.fontweight = nFontWeight
 
</pre>
 
</pre>
  
===nWeight===
+
===nFontWeight===
 
Numeric signifying the font weight:
 
Numeric signifying the font weight:
  
Line 24: Line 24:
 
|-
 
|-
 
|}
 
|}
 +
  
 
==Example==
 
==Example==

Revision as of 07:40, 26 September 2011

The thickness of an object's font. Read/write.

nFontWeight = ob.fontweight
ob.fontweight = nFontWeight

nFontWeight

Numeric signifying the font weight:

Value Description
25 Light
50 Normal
63 DemiBold
75 Bold
87 Black


Example

//
// Lianja custom section for page "page1" section "section1"
//
namespace custom1
public textbox1
define class page1_section1 as section
enddefine
 
 
define class font_button as CommandButton
	proc click
		textbox1.fontweight = 25
		messagebox(etos(int(textbox1.fontweight)),0,"Fontweight")
	endproc
enddefine
 
proc page1_section1 
	page1_section1 = createobject("page1_section1")
 
	page1_section1.addobject("fontbutton","font_button")
	fontbutton.caption = "Lose Weight!"	
 
	page1_section1.addobject("textbox1", "Textbox")
	textbox1.value = "Textbox"
	textbox1.fontweight = 75
return page1_section1