Text
From Unofficial Konfabulator Wiki
[edit] Attributes (by function)
- Basics: data name
- Box Model: alignment hAlign height hOffset vOffset width window zOrder
- Box Appearance: bgColor bgOpacity opacity
- Content Appearance: color font size style truncation
- Events: onContextMenu onDragDrop onDragEnter onDragExit onMouseDown onMouseEnter onMouseExit onMouseMove onMouseUp onMultiClick
- Extra: contextMenuItems scrolling tooltip
[edit] Attributes
[edit] alignment
|
alignment will control how the object is aligned, working together with hOffset. alignment also is a synonym of hAlign, so never use both. [edit] Possible Values:
[edit] JavaScript:myObjectName.alignment = "center"; [edit] Example:<alignment>center</alignment> |
[edit] bgColor
|
bgColor works with bgOpacity. The bg stands for background. color stands for color. The bgColor attribute works the same as the color attribute. [edit] Possible Values:Browser style hex RGB triplets (ex: #000000) |
[edit] bgOpacity
|
bgOpacity works with bgColor. The bg stands for background. The opacity stands for opacity. |
[edit] color
|
color controls what color the text will be. Possible values are: browser-style color objects (ex: #FFFFFF) |
[edit] contextMenuItems
[edit] data
[edit] font
|
font works together with size and style. For all text objects (text, textarea, about-text). |
[edit] hAlign
|
hAlign will control how the object is aligned, working together with hOffset. hAlign also is a synonym of alignment, so never use both. Possible values are:
JavaScript: myObjectName.hAlign = "center"; Example: <hAlign>center</hAlign> |
[edit] height
|
The height attribute controls the vertical dimension of the box model, or how high it looks on the screen. If Omitted: The height of the box defaults to a value of -1 and the box height is then automatically determined. JavaScript: myObjectName.height = 30; Example: <height>30</height> or <height = "30" /> |
[edit] hOffset
|
the horizontal offset of the object JavaScript: myObjectName.hOffset = 44; Example: <hOffset>44</hOffset> |
[edit] name
|
The name is used to identify the object in JavaScript. JavaScript: object.name = "myObjectName"; Example: <name>myObjectName</name> |
[edit] onContextMenu
[edit] onDragDrop
[edit] onDragEnter
[edit] onDragExit
[edit] onMouseDown
[edit] onMouseEnter
[edit] onMouseExit
[edit] onMouseMove
[edit] onMouseUp
[edit] onMultiClick
[edit] opacity
|
opacity controls the opacity =) It is a range from 0 to 255. 0 being invisible and 255 being completely opaque. To hide an object, a common practice is to set its opacity to 0. But these days, the 'visible' property is the better thing to use, as you don't have to track the previous opacity to restore it later. To hide an object but still interact with it, it's common practice to set its opacity to 1. See also: object tracking JavaScript: myObjectName.opacity = 200; Example: <opacity>200</opacity> |
[edit] rotate
Function not available (as of release 3.0). There is no known way of rotating text (or textarea).
[edit] scrolling
[edit] size
|
size controls the font size in the units of points. You can think of a point as being a pixel, but you'd be wrong. Close enough though. |
[edit] style
|
style works with font and size to control the basic look of a text element. possible values : italic, bold, narrow, expanded, condensed, smallcap, poster, compressed, fixed The font must support the style, otherwise it will be ignored. To specify multiple styles, separate them with a semicolon. Check the examples. JavaScript: someTextObject.style = "italic;bold;narrow"; Example: <style>italic;bold;narrow</style> |
[edit] truncation
[edit] tooltip
|
tooltip is the text that appears when the mouse hovers over the parent object. You cannot control the appearance. |
[edit] vOffset
|
vOffset controls the vertical placement. This works with vAlign and is related to hOffset. value : integer (floating point just gets rounded) JavaScript: myObjectName.vOffset = 100; Example: <vOffset>100</vOffset> |
[edit] width
|
width controls how wide the object appears to be. Related to height. value : integer (floating point gets rounded) |
[edit] window
|
Most widgets only contain one window, however, after version 2.0, widgets could have multiple windows, and the window attribute specifies to which window the object belongs to. However, in version 2.1, a new syntax was introduced that makes this attribute obsolete. |
[edit] zOrder
|
Stacking order. Objects with lower zOrders appear below higher zOrders. value : nonnegative integers |
