Difference between revisions of "Fontweight Property"

From Lianjapedia
Jump to: navigation, search
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
The thickness of an object's font. Read/write.
+
The thickness of an object's font. Read/write.
  
 
<pre>
 
<pre>

Revision as of 12:18, 7 April 2011

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

nWeight = ob.fontweight
ob.fontweight = nWeight

nWeight

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