Farbflash projects: Imaging lingo table | 3-D scene list | Find all | Handler menu | Lingo message window

source: trunk/docs/AlexTableScript/AlexTableScript1.html

Last change on this file was 1, checked in by alex, 26 years ago

initial import

File size: 8.1 KB
Line 
1<html>
2<head>
3<title>AlexTableScript: CellProperties</title>
4</head>
5<body bgcolor="#FFFFFF">
6<font face="Geneva, MS Sans Serif" size=4>The content for the table is provided as property list&#58; <p>
7<b>-- itemlist&#58; property list with two properties&#58;<p>
8</b>&#35;myItems = the cell content and formatting<br>
9&#35;columnInfo = the column widths<br>
10(there is also a &#35;sorttype property for columns in case of sorting the column<br>
11the values can be &#35;alphanumeric or &#35;numeric, &#35;numeric sorts by value rather than by ascii value)<p>
12</font><font color="#000088">rowCells = []<br>
13columnInfo = []<br>
14itemList[&#35;myItems] = rowCells<br>
15itemList[&#35;verteilung] = columnInfo<p>
16</font><font size=3 color="#000000">&#35;verteilung defines the column widths either absolut (-&gt; integer) or relativ (-&gt; float = %) or both mixed up<p>
17</font><font color="#EE0000">-- example&#58; five columns with 150 pixels each&#58;<p>
18</font><font color="#000088">repeat with n = 1 to 5<br>
19column = [&#58;]<br>
20column[&#35;myWidth] = 150<br>
21-- column[&#35;myWidth] = 0.2 -- this would be 20 % of tableformatlist[&#35;targrect].width<br>
22columnInfo.add(column)<br>
23end repeat<p>
24<br>
25</font><font color="#EE0000">-- another example with % and alignmenmt for each column&#58;<p>
26</font><font color="#000088">columnninfo = [[0.08, &#35;right], [0.23, &#35;left], [0.07, &#35;right], [0.12, &#35;right], [0.1, &#35;left], [0.12, &#35;right], [0.12, &#35;right], [0.16, &#35;right]]<p>
27cnt = columnninfo.count<br>
28repeat with hn = 1 to cnt<br>
29column = [&#58;]<br>
30column[&#35;myWidth] = columnninfo[hn][1]<br>
31column[&#35;halign] = columnninfo[hn][2]<br>
32columnInfo.add(column)<br>
33end repeat<p>
34<br>
35</font><font color="#000000">-- row = property list = one row<br>
36-- may have all the formatting properties as tableformatlist has and overrides them for this row<br>
37-- and must have a property&#58; &#35;myItems which is a linear list containing the single cell information<p>
38</font><font color="#EE0000">-- &lt;tr&gt;<br>
39</font><font color="#000088">row = [&#58;]<br>
40rowCells = []<br>
41row[&#35;myItems] = rowCells<br>
42row[&#35;myBorderWidth] = 0<br>
43row[&#35;myBorderColor] = rgb(50,50,50)<br>
44row[&#35;myBGColor] = rgb( 238, 216, 195 )<p>
45<br>
46</font><font color="#000000"><b>-- thisCell = property list = single cell<br>
47</b>-- may have all the formatting properties as tableformatlist or &#35;row has and overrides them for this cell<br>
48-- beyond the formatting props there are other props&#58;<p>
49</font><font color="#EE0000"><b>-- required&#58;<p>
50</font></b><font color="#000000">-- thisCell[&#35;<b>myType</b>] = &lt;symbol&gt; type of this cell; possible values&#58; &#35;edittext, &#35;textcell, &#35;imagecell, </font><font color="#004000">&#35;</font><font color="#000000">divider<p>
51-- thisCell[&#35;<b>myContent</b>] = &lt;string&gt;, &lt;image&gt; content of this cell;<br>
52-- if &#35;myType = &#35;imagecell -&gt; accepts image object or &lt;string&gt; in case of &lt;string&gt; the image of member(&lt;string&gt;) is used, if a member(&lt;string&gt;) of type &#35;bitmap exists<p>
53</font><font color="#EE0000"><b>-- not required&#58;<p>
54</font></b><font color="#000000">-- thisCell[&#35;<b>myName</b>] = &lt;string&gt; cellname to reference a cell by name; default = &quot;zelle&quot;&amp;&lt;row&gt;&amp;&lt;column&gt;<br>
55-- thisCell[&#35;<b>colspan</b>] = &lt;integer&gt; column span; default = 1<p>
56-- thisItem[&#35;<b>selectable</b>] = &lt;boolean&gt; reacts on mouse Over and Up and sends messages; default = false<p>
57-- thisCell[&#35;<b>minimumLineHeight</b>] = &lt;integer&gt; minimum height of cells (useful for cells with an empty string or only a space); default = 0<p>
58-- thisCell[&#35;<b>nowrap</b>] = &lt;boolean&gt; text doesn't wrap to next line, if it doesn't fit into the columns width, but rather gets cropped<p>
59-- thisItem[&#35;<b>sortby</b>] = &lt;any&gt; 'invisible' sort criterium rather than sorting by thisItem[&#35;myContent] (= default)<p>
60<br>
61</font><font color="#EE0000">-- if &#35;myType = &#35;edittext&#58;<p>
62</font><font color="#000000">-- thisCell[&#35;<b>allowedChars</b>] = &lt;string&gt; accepted chars; default = &quot;&quot; (EMPTY string allows all chars)<p>
63-- thisCell[&#35;<b>numChars</b>] = &lt;integer&gt; allowed number of chars; default = 0 (0 = unlimited -&gt; scrolls horizontal)<p>
64</font><font color="#EE0000">-- if &#35;myType = &#35;imagecell&#58;<p>
65</font><font color="#000000">-- thisCell[&#35;<b>inkmode</b>] = &lt;integer&gt; directors inkmodes;<br>
66-- thisCell[&#35;<b>myBlendLevel</b>] = &lt;integer&gt; blendlevel, range&#58; 0 - 255;<p>
67</font><font color="#EE0000">-- Button cells&#58;<p>
68</font><font color="#000000">-- thisCell[&#35;<b>isButton</b>] = &lt;symbol&gt; allows an &#35;imagecell to act as button; default = &#35;none; possible values&#58; &#35;none, &#35;push, &#35;radio, &#35;toggle, &#35;sortbutton<p>
69-- thisCell[&#35;<b>myPressImage</b>] = &lt;imageObject or string&gt; selfexplaining; default&#58; thisCell[&#35;myContent]<p>
70-- thisCell[&#35;<b>myOverImage</b>] = &lt;imageObject or string&gt; selfexplaining; default&#58; thisCell[&#35;myContent]<p>
71-- thisCell[&#35;<b>myGroupname</b>] = &lt;string&gt; used to group toggle buttons &#35;default&#58; &quot;Group1&quot;<p>
72-- thisCell[&#35;myKeyboardShortCut] = &lt;string&gt; keyboardshortcut for this button. only the first char is used. Use RETURN to mimic the default button<p>
73</font><font color="#EE0000">-- if &#35;myType = &#35;divider&#58;<p>
74</font><font color="#000000">-- thisCell[&#35;<b>lineSize</b>] = &lt;integer&gt;<p>
75<br>
76</font><font color="#EE0000">-- further all formatting properties as tableformatlist or &#35;row has and overrides them for this cell<p>
77<br>
78-- examples for different cells&#58;<p>
79-- &lt;td&gt; -- simple text cell<br>
80</font><font color="#000088">thisItem = [&#58;]<br>
81thisItem[&#35;myType] = &#35;textcell<br>
82thisItem[&#35;myContent] = &quot;einerderrechtsalignedwirdeinerderrechtsalignedwird&quot;<br>
83thisItem[&#35;halign] = &#35;right<br>
84thisItem[&#35;myBGColor] = rgb(0,0,200)<br>
85thisItem[&#35;selectable] = 0<br>
86rowCells.add(thisItem)<br>
87</font><font color="#EE0000">-- &lt;&#47;td&gt;<p>
88<br>
89-- &lt;td&gt; --- simple image cell<br>
90</font><font color="#000088">thisItem = [&#58;]<br>
91thisItem[&#35;myType] = &#35;imagecell<br>
92thisItem[&#35;myContent] = &quot;whale&quot;<br>
93thisItem[&#35;myBGColor] = rgb(0,200,0)<br>
94thisItem[&#35;halign] = &#35;center<br>
95thisItem[&#35;valign] = &#35;center<br>
96thisItem[&#35;colspan] = 3<br>
97thisItem[&#35;selectable] = 1<br>
98rowCells.add(thisItem)<br>
99</font><font color="#EE0000">-- &lt;&#47;td&gt;<p>
100-- &lt;td&gt; -- imagecell acting as button<br>
101</font><font color="#000088">thisItem = [&#58;]<br>
102thisItem[&#35;myType] = &#35;imagecell<br>
103thisItem[&#35;myContent] = myNormalButtonImage<br>
104thisItem[&#35;isButton] = &#35;toggle<br>
105thisItem[&#35;myGroup] = &quot;custom group&quot;<br>
106thisItem[&#35;myPressImage] = myPressedButtonImage<br>
107thisItem[&#35;myOverImage] = myRolloverButtonImage<br>
108thisItem[&#35;myBGColor] = rgb(0,200,0)<br>
109thisItem[&#35;halign] = &#35;center<br>
110thisItem[&#35;valign] = &#35;center<br>
111thisItem[&#35;selectable] = 1<br>
112rowCells.add(thisItem)<br>
113</font><font color="#EE0000">-- &lt;&#47;td&gt;<p>
114-- &lt;td&gt; -- &lt;hr&gt;<br>
115</font><font color="#000088">thisCell = [&#58;]<br>
116thisCell[&#35;myType] = &#35;divider<br>
117thisCell[&#35;myContent] = &quot;&quot;<br>
118thisCell[&#35;lineSize] = 4<br>
119rowCells.add(thisCell)<br>
120</font><font color="#EE0000">-- &lt;&#47;td&gt;<p>
121-- &lt;td&gt; -- editable text<br>
122</font><font color="#000088">thisCell = [&#58;]<br>
123thisCell[&#35;myType] = &#35;edittext<br>
124thisCell[&#35;myContent] = &quot;12&quot;<br>
125thisCell[&#35;allowedChars] = &quot;0123456789&quot;<br>
126thisCell[&#35;numChars] = 4<br>
127rowCells.add(thisCell)<br>
128</font><font color="#EE0000">-- &lt;&#47;td&gt;<p>
129</font><font color="#000088">rowCells.add(row)<br>
130</font><font color="#EE0000">-- &lt;&#47;tr&gt;<p>
131</font><font color="#000088">derkanal = mGetKanal(&#35;tablekanal)<br>
132if derkanal &gt; 0 then sendsprite(derkanal, &#35;mShowTable, itemList, tableformatlist, &quot;tablename&quot;)</font><font color="#000000"> </font></body>
133</html>
Note: See TracBrowser for help on using the repository browser.