Difference between revisions of "Fontstretch Property"
From Lianjapedia
Yvonne.milne (Talk | contribs) (Created page with '// textbox1.fontstretch = 200 // Predefined stretch values that follow the CSS naming convention: // Constant Value Description // UltraCondensed 50 50 // ExtraCondensed 6…') |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | / | + | __NOTOC__ |
− | / | + | The amount an object's font is expanded or compressed. Read/write. |
− | + | ||
− | + | <pre> | |
− | + | nStretch = ob.fontstretch | |
− | // | + | ob.fontstretch = nStretch |
− | // | + | </pre> |
− | // | + | |
− | + | ===nStretch=== | |
− | + | Numeric signifying the amount of font stretch: | |
− | + | ||
− | / | + | {|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