Difference between revisions of "Fontstretch Property"

From Lianjapedia
Jump to: navigation, search
(Created page with '// textbox1.fontstretch = 200 // Predefined stretch values that follow the CSS naming convention: // Constant Value Description // UltraCondensed 50 50 // ExtraCondensed 6…')
 
Line 1: Line 1:
// textbox1.fontstretch = 200
+
__NOTOC__
// Predefined stretch values that follow the CSS naming convention:
+
The amount an object's font is expanded or compressed. Read/write.
// Constant Value Description
+
 
// UltraCondensed 50 50
+
<pre>
// ExtraCondensed 62 62
+
nStretch = ob.fontstretch
// Condensed 75 75
+
ob.fontstretch = nStretch
// SemiCondensed 87 87
+
</pre>
// Unstretched 100 100
+
 
// SemiExpanded 112 112
+
===nStretch===
// Expanded 125 125
+
Numeric signifying the amount of font stretch:
// ExtraExpanded 150 150
+
 
// UltraExpanded 200 200
+
{|class="wikitable"
 +
!Value||Description
 +
|-
 +
|50||UltraCondensed
 +
|-
 +
|62||ExtraCondensed
 +
|-
 +
|75||Condensed
 +
|-
 +
|87||SemiCondensed
 +
|-
 +
|100||Unstretched
 +
|-
 +
|112||SemiExpanded
 +
|-
 +
|125||Expanded
 +
|-
 +
|150||ExtraExpanded
 +
|-
 +
|200||UltraExpanded
 +
|-
 +
|}
 +
 
 +
 
 +
==Example==
 +
<code lang="recital">
 +
//
 +
// 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.fontstretch = 200
 +
messagebox(etos(int(textbox1.fontstretch)),0,"Fontstretch")
 +
endproc
 +
enddefine
 +
 
 +
proc page1_section1
 +
page1_section1 = createobject("page1_section1")
 +
 +
page1_section1.addobject("fontbutton","font_button")
 +
fontbutton.caption = "Stretch It!"
 +
 +
page1_section1.addobject("textbox1", "Textbox")
 +
textbox1.value = "Textbox"
 +
textbox1.fontstretch = 75
 +
return page1_section1
 +
</code>

Revision as of 12:02, 7 April 2011

The amount an object's font is expanded or compressed. Read/write.

nStretch = ob.fontstretch
ob.fontstretch = nStretch

nStretch

Numeric signifying the amount of font stretch:

Value Description
50 UltraCondensed
62 ExtraCondensed
75 Condensed
87 SemiCondensed
100 Unstretched
112 SemiExpanded
125 Expanded
150 ExtraExpanded
200 UltraExpanded


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.fontstretch = 200
		messagebox(etos(int(textbox1.fontstretch)),0,"Fontstretch")
	endproc
enddefine
 
proc page1_section1 
	page1_section1 = createobject("page1_section1")
 
	page1_section1.addobject("fontbutton","font_button")
	fontbutton.caption = "Stretch It!"	
 
	page1_section1.addobject("textbox1", "Textbox")
	textbox1.value = "Textbox"
	textbox1.fontstretch = 75
return page1_section1