Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<style type="text/css">
2
		<!--
3
		A:link        {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
4
		A:visited     {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: none; color: #0000ff}
5
		A:hover       {font-family: helvetica, arial, geneva, sans-serif; font-size: x-small; text-decoration: underline; color: #FF0000}
6
		th            {font-family: helvetica, arial; color : blue; font-size:85%; background : lightgrey; border-right:black solid 1pt; border-bottom:black solid 1pt;}
7
		//-->
8
		</style><hr><a name="_C_GTEXTTABLE"><div style="background-color:yellow;font-family:courier new;"></a>CLASS <b>GTextTable</b></div>
9
<i>(Defined in: jpgraph_table.php : 438)</i><table border=1><tr><td>&nbsp;<a href="GTextTable.html" style="font-family:arial;font-weight:bold;color:darkblue;">GTextTable</a>&nbsp;</td></tr><tr><td valign=top>&nbsp;<a href="GTextTable.html#_GTEXTTABLE_GTEXTTABLE">GTextTable()</a>&nbsp;<br>
10
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_INIT">Init()</a>&nbsp;<br>
11
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_MERGECELLS">MergeCells()</a>&nbsp;<br>
12
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_MERGECOL">MergeCol()</a>&nbsp;<br>
13
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_MERGEROW">MergeRow()</a>&nbsp;<br>
14
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SET">Set()</a>&nbsp;<br>
15
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETALIGN">SetAlign()</a>&nbsp;<br>
16
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETANCHORPOS">SetAnchorPos()</a>&nbsp;<br>
17
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETBORDER">SetBorder()</a>&nbsp;<br>
18
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCELLALIGN">SetCellAlign()</a>&nbsp;<br>
19
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCELLCOLOR">SetCellColor()</a>&nbsp;<br>
20
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCELLCOUNTRYFLAG">SetCellCountryFlag()</a>&nbsp;<br>
21
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCELLCSIMTARGET">SetCellCSIMTarget()</a>&nbsp;<br>
22
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCELLFILLCOLOR">SetCellFillColor()</a>&nbsp;<br>
23
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCELLFONT">SetCellFont()</a>&nbsp;<br>
24
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCELLIMAGE">SetCellImage()</a>&nbsp;<br>
25
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCELLIMAGECONSTRAIN">SetCellImageConstrain()</a>&nbsp;<br>
26
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCELLNUMBERFORMAT">SetCellNumberFormat()</a>&nbsp;<br>
27
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCELLPADDING">SetCellPadding()</a>&nbsp;<br>
28
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCOLALIGN">SetColAlign()</a>&nbsp;<br>
29
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCOLCOLOR">SetColColor()</a>&nbsp;<br>
30
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCOLFILLCOLOR">SetColFillColor()</a>&nbsp;<br>
31
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCOLFONT">SetColFont()</a>&nbsp;<br>
32
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCOLGRID">SetColGrid()</a>&nbsp;<br>
33
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCOLIMAGE">SetColImage()</a>&nbsp;<br>
34
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCOLNUMBERFORMAT">SetColNumberFormat()</a>&nbsp;<br>
35
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCOLOR">SetColor()</a>&nbsp;<br>
36
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCOLPADDING">SetColPadding()</a>&nbsp;<br>
37
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETCSIMTARGET">SetCSIMTarget()</a>&nbsp;<br>
38
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETFILLCOLOR">SetFillColor()</a>&nbsp;<br>
39
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETFONT">SetFont()</a>&nbsp;<br>
40
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETGRID">SetGrid()</a>&nbsp;<br>
41
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETIMAGE">SetImage()</a>&nbsp;<br>
42
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETMINCOLWIDTH">SetMinColWidth()</a>&nbsp;<br>
43
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETMINROWHEIGHT">SetMinRowHeight()</a>&nbsp;<br>
44
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETNUMBERFORMAT">SetNumberFormat()</a>&nbsp;<br>
45
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETPADDING">SetPadding()</a>&nbsp;<br>
46
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETPOS">SetPos()</a>&nbsp;<br>
47
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETROWALIGN">SetRowAlign()</a>&nbsp;<br>
48
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETROWCOLOR">SetRowColor()</a>&nbsp;<br>
49
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETROWFILLCOLOR">SetRowFillColor()</a>&nbsp;<br>
50
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETROWFONT">SetRowFont()</a>&nbsp;<br>
51
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETROWGRID">SetRowGrid()</a>&nbsp;<br>
52
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETROWIMAGE">SetRowImage()</a>&nbsp;<br>
53
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETROWNUMBERFORMAT">SetRowNumberFormat()</a>&nbsp;<br>
54
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETROWPADDING">SetRowPadding()</a>&nbsp;<br>
55
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_SETSCALEPOS">SetScalePos()</a>&nbsp;<br>
56
&nbsp;<a href="GTextTable.html#_GTEXTTABLE_TOSTRING">toString()</a>&nbsp;<br>
57
</td></tr></table>&nbsp;<p><div style="font-weight:bold;font-family:arial;font-size:100%;">Class usage and Overview</div>When visualizing data it is often useful to have both a quick graphical view which can show high level trends and a detailed view with the exact figures. The pro-version of JpGraph now supports the creation of graphic tables in all available graph types.
58
 
59
The specification of the tables data, position, fonts, alignment, colors, borders etc. is all fully flexible with an intuitive set of APIs to control the table. In this HowTo we will start by showing how to build basic tables which we will augment with more advanced formatting by introducing the formatting capabilities one by one.
60
 
61
In addition to adding data tables to graphs it is also possible to create graphic tables on the fly all by its own. This has the advantage compared with HTML tables to allow users to make copies of the table while maintaining the exact formatting of the table. Figure 2. shows an example with just a graphical table  <p> &nbsp;
62
<hr><span style="font-family:arial;font-size:120%;font-weight:bold;">Class Methods</span><hr><p>
63
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_GTEXTTABLE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
64
function&nbsp;GTextTable()</font>
65
</b></div></a></span>
66
 
67
<span style='font-family:arial;font-size:90%;'><i>Create a new Graphic text table</i></span><p>
68
<br>
69
 
70
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Create a new Graphic text table. The next call should either be to specify a value for the table (using GTextTable::Set() ) or a call to GTextTable::Init() to specify the size of table.&nbsp;<br>
71
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_INIT">GTextTable::Init</a> and <a href="GTextTable.html#_GTEXTTABLE_SET">GTextTable::Set</a>
72
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
73
$table&nbsp;=&nbsp;new&nbsp;GTextTable();
<br />$table-&gt;Set($tableData);
<br /></font>
74
</span><br>
75
<p>
76
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_INIT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
77
function&nbsp;Init($aRows,$aCols,$aFillText)</font>
78
</b></div></a></span>
79
80
<span style='font-family:arial;font-size:90%;'><i>Initialize the size for a newly created table</i></span><p>
81
 
82
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
83
 
84
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
85
$aRows</font>
86
87
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
88
 
89
</td><td>Number of rows in table</td></tr>
90
91
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
92
 
93
94
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
95
 
96
</td><td>Number of columns in table</td></tr>
97
98
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
99
 
100
101
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
102
 
103
</td><td>Deafult fill value for each cell</td></tr>
104
</table>
105
106
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>After the table has been created the size of the table has to be established. This can either be done by a call to this method or by supplying a matrix in the call to Set().
107
 
108
If You plan on specifying the cells by individual calls to Set($row,$col,$value) then this method must have been called after the creation of the table.
109
<p>
110
When You set the entire table content with a call to Set() with a full 2D-matrix as argument the size of the matrix will be used to determine the size of the table.&nbsp;<br>
111
112
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
113
 
114
</span><br>
115
<p>
116
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_MERGECELLS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
117
function&nbsp;MergeCells($aR1,$aC1,$aR2,$aC2,$aHAlign,$aVAlign)</font>
118
</b></div></a></span>
119
120
<span style='font-family:arial;font-size:90%;'><i>Merge cells in the specified range</i></span><p>
121
122
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
123
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
124
 
125
$aR1</font>
126
 
127
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Top left row</td></tr>
128
129
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
130
$aC1</font>
131
 
132
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Top left column</td></tr>
133
 
134
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
135
$aR2</font>
136
 
137
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Bottom right row</td></tr>
138
 
139
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
140
$aC2</font>
141
 
142
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Bottom right column</td></tr>
143
 
144
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
145
$aHAlign</font>
146
 
147
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
148
 
149
</td><td>Horizontal alignment</td></tr>
150
151
 
152
$aVAlign</font>
153
154
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
155
 
156
</td><td>Vertical alignment</td></tr>
157
</table>
158
 
159
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Merge cells in the specified range. The alignment of the merged cells cab be set by the laet two optional arguments.
160
161
Note: To merge all cells in a specific row or column use the alternative methods MergeCol() and MergeRow()&nbsp;<br>
162
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_MERGEROW">GTextTable::MergeRow</a> and <a href="GTextTable.html#_GTEXTTABLE_MERGECOL">GTextTable::MergeCol</a>
163
 
164
//&nbsp;Merge&nbsp;the&nbsp;top&nbsp;2x2&nbsp;cells
<br />$table-&gt;MergeCells(0,0,1,1,"right");</font>
165
 
166
<p>
167
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_MERGECOL"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
168
function&nbsp;MergeCol($aCol,$aHAlign,$aVAlign)</font>
169
</b></div></a></span>
170
171
<span style='font-family:arial;font-size:90%;'><i>Merge all cells in one column</i></span><p>
172
173
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
174
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
175
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
176
 
177
178
 
179
180
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
181
$aHAlign</font>
182
183
 
184
'center'</font>
185
 
186
187
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
188
 
189
190
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
191
'center'</font>
192
 
193
</table>
194
195
 
196
197
Note: By default if no alignment is given the content in the merged cells will be centered both horixontally and vertically.&nbsp;<br>
198
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_MERGECELLS">GTextTable::MergeCells</a> and <a href="GTextTable.html#_GTEXTTABLE_MERGEROW">GTextTable::MergeRow</a>
199
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
200
 
201
</span><br>
202
 
203
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_MERGEROW"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
204
function&nbsp;MergeRow($aRow,$aHAlign,$aVAlign)</font>
205
</b></div></a></span>
206
207
<span style='font-family:arial;font-size:90%;'><i>Merge all cells in one row.</i></span><p>
208
209
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
210
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
211
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
212
 
213
214
 
215
216
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
217
$aHAlign</font>
218
219
 
220
'center'</font>
221
 
222
223
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
224
 
225
226
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
227
'center'</font>
228
 
229
</table>
230
231
 
232
233
Note: By default if no alignment is given the content in the merged cells will be centered both horixontally and vertically.&nbsp;<br>
234
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_MERGECELLS">GTextTable::MergeCells</a> and <a href="GTextTable.html#_GTEXTTABLE_MERGECOL">GTextTable::MergeCol</a>
235
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
236
 
237
</span><br>
238
 
239
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SET"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
240
function&nbsp;Set($aArg1,$aArg2,$aArg3)</font>
241
</b></div></a></span>
242
243
<span style='font-family:arial;font-size:90%;'><i>Set the value in cell or cells</i></span><p>
244
245
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
246
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
247
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
248
 
249
250
 
251
252
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
253
$aArg2</font>
254
255
 
256
NULL</font>
257
 
258
259
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
260
 
261
262
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
263
NULL</font>
264
 
265
</table>
266
267
 
268
<ol>
269
<li><b>Set($aTableMatrix)</b>, Specify the entire table by supplying a 2D-Matrix
270
<li><b>Set($aRow,$aCol,$aValue)</b>, Set the value in a specific cell. Note that if You use this method then the size of the table muts have been previously specified with a call to Init()
271
</ol>
272
 
273
Note: If the table is initialized with an 2D-matrix then there is no need to call the Init() method since the ovberall size of the table will be set to the same as the supplied matrix.
274
275
Note: After the entire table have beedn specified with an initial 2D-array it is of course still possible to modify/set individual values with a call to the second version of the table.
276
&nbsp;<br>
277
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_INIT">GTextTable::Init</a>
278
 
279
//&nbsp;Create&nbsp;a&nbsp;new&nbsp;table&nbsp;from&nbsp;a&nbsp;2D-array
<br />$data&nbsp;=&nbsp;array(
<br />&nbsp;&nbsp;&nbsp;array("Jun",34,18,13),&nbsp;
<br />&nbsp;&nbsp;&nbsp;array("Jul",15,9,12));
<br />$table&nbsp;=&nbsp;new&nbsp;GTextTable();
<br />$table-&gt;Set($data);
<br />$table-&gt;SetAlign("right");
<br />...
<br />
<br />
<br />//&nbsp;Create&nbsp;a&nbsp;table&nbsp;by&nbsp;setting&nbsp;individual&nbsp;cells
<br />$table&nbsp;=&nbsp;new&nbsp;GTextTable();
<br />$table-&gt;Init(5,7);&nbsp;//&nbsp;5&nbsp;rows&nbsp;by&nbsp;7&nbsp;column&nbsp;sized&nbsp;table
<br />
<br />for($i=0;&nbsp;$i&nbsp;&lt;&nbsp;5;&nbsp;++$i)&nbsp;{
<br />&nbsp;&nbsp;for($j=0;&nbsp;$j&nbsp;&lt;&nbsp;7;&nbsp;++$j)&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;$table-&gt;Set(0,0,$data[$i][$j]);
<br />&nbsp;&nbsp;}
<br />}
<br />...
<br />
<br />$table-&gt;Set(0,0,$data1);
<br />
<br />
<br /></font>
280
 
281
<p>
282
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETALIGN"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
283
function&nbsp;SetAlign($aR1HAlign,$aC1VAlign,$aR2,$aC2,$aHArg,$aVArg)</font>
284
</b></div></a></span>
285
286
<span style='font-family:arial;font-size:90%;'><i>Set cell alignment for entire table or range of cells</i></span><p>
287
288
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
289
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
290
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
291
$aR1HAlign</font>
292
293
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
294
null</font>
295
</td><td>Top left row OR horizontal alignment</td></tr>
296
297
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
298
$aC1VAlign</font>
299
300
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
301
null</font>
302
</td><td>Top left column OR vertical alignment</td></tr>
303
304
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
305
$aR2</font>
306
307
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
308
null</font>
309
</td><td>Bottom right row</td></tr>
310
311
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
312
$aC2</font>
313
314
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
315
 
316
</td><td>Bottom right column</td></tr>
317
 
318
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
319
$aHArg</font>
320
321
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
322
 
323
</td><td>Horizontal alignment</td></tr>
324
325
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
326
 
327
328
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
329
 
330
</td><td>Vertical alignment</td></tr>
331
</table>
332
333
 
334
335
The possible settings for horizontal alignment are
336
 
337
338
Vertical alignment can be set as
339
"top","center","bottom"
340
 
341
Note that the alignment options are specified as strings.
342
&nbsp;<br>
343
 
344
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
345
//&nbsp;Set&nbsp;the&nbsp;default&nbsp;alignment&nbsp;for&nbsp;the&nbsp;entire&nbsp;table
<br />$table-&gt;SetAlign("right");
<br />
<br />//&nbsp;The&nbsp;set&nbsp;the&nbsp;first&nbsp;column&nbsp;to&nbsp;use&nbsp;left&nbsp;alignment
<br />$table-&gt;SetColAlign(0,"left");
<br /></font>
346
</span><br>
347
 
348
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETANCHORPOS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
349
function&nbsp;SetAnchorPos($aXAnchor,$aYAnchor)</font>
350
 
351
352
<span style='font-family:arial;font-size:90%;'><i>Specify where the anchor position of the table should be</i></span><p>
353
354
 
355
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
356
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
357
 
358
359
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Horizontal anchor</td></tr>
360
361
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
362
 
363
364
 
365
'top'</font>
366
</td><td>Vertical anchor</td></tr>
367
 
368
369
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify where the anchor of the table should be. By default the anchor is top left corner so that the positoin you specify for the table is taken as the top left corner.
370
 
371
This can be adjusted horixontally as
372
"left", "center" or "right"
373
374
Vertically it can be adjusted as
375
"top","center","bottom"
376
&nbsp;<br>
377
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETPOS">GTextTable::SetPos</a> and <a href="GTextTable.html#_GTEXTTABLE_SETSCALEPOS">GTextTable::SetScalePos</a>
378
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
379
//&nbsp;Make&nbsp;the&nbsp;position&nbsp;refer&nbsp;to&nbsp;the&nbsp;center&nbsp;of&nbsp;the&nbsp;table
<br />$table-&gt;SetAnchorPos('center','center');
<br /></font>
380
</span><br>
381
<p>
382
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETBORDER"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
383
function&nbsp;SetBorder($aWeight,$aColor)</font>
384
</b></div></a></span>
385
386
 
387
388
 
389
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
390
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
391
$aWeight</font>
392
393
 
394
1</font>
395
 
396
397
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
398
 
399
400
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
401
'black'</font>
402
</td><td>Color of border</td></tr>
403
 
404
405
 
406
407
Note: Specify a weight of 0 to disable the border entirely.&nbsp;<br>
408
 
409
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
410
...
<br />$table-&gt;SetBorder(2,"navy");
<br />...
<br /></font>
411
</span><br>
412
<p>
413
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCELLALIGN"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
414
function&nbsp;SetCellAlign($aRow,$aCol,$aHorAlign,$aVertAlign)</font>
415
</b></div></a></span>
416
417
<span style='font-family:arial;font-size:90%;'><i>Set cell alignment for a specified cell.</i></span><p>
418
419
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
420
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
421
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
422
 
423
424
 
425
426
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
427
$aCol</font>
428
429
 
430
431
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
432
$aHorAlign</font>
433
 
434
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Horizontal alignment</td></tr>
435
436
 
437
$aVertAlign</font>
438
439
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
440
'bottom'</font>
441
 
442
</table>
443
 
444
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set cell alignment for a specified cell. The alignment can be specifed both horizontally and vertically.
445
446
The possible settings for horizontal alignment are
447
"left", "center", "right"
448
449
Vertical alignment can be set as
450
"top","center","bottom"
451
452
Note that the alignment options are specified as strings.
453
&nbsp;<br>
454
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETALIGN">GTextTable::SetAlign</a>, <a href="GTextTable.html#_GTEXTTABLE_SETCOLALIGN">GTextTable::SetColAlign</a> and <a href="GTextTable.html#_GTEXTTABLE_SETROWALIGN">GTextTable::SetRowAlign</a>
455
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
456
 
457
</span><br>
458
 
459
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCELLCOLOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
460
function&nbsp;SetCellColor($aRow,$aCol,$aColor)</font>
461
</b></div></a></span>
462
463
 
464
465
 
466
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
467
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
468
 
469
470
 
471
472
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
473
 
474
475
 
476
477
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
478
 
479
480
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Font color</td></tr>
481
</table>
482
483
 
484
485
 
486
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETCOLOR">GTextTable::SetColor</a>, <a href="GTextTable.html#_GTEXTTABLE_SETROWCOLOR">GTextTable::SetRowColor</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLCOLOR">GTextTable::SetColColor</a>
487
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
488
 
489
</span><br>
490
<p>
491
 
492
function&nbsp;SetCellCountryFlag($aRow,$aCol,$aFlag,$aScale,$aMix,$aStdSize)</font>
493
</b></div></a></span>
494
495
<span style='font-family:arial;font-size:90%;'><i>Set a country flag in the background of the specified cell</i></span><p>
496
497
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
498
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
499
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
500
$aRow</font>
501
502
 
503
504
 
505
$aCol</font>
506
507
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Column index</td></tr>
508
509
 
510
$aFlag</font>
511
 
512
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Flag specification partial name or index</td></tr>
513
514
 
515
$aScale</font>
516
 
517
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
518
1.0</font>
519
 
520
521
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
522
 
523
524
 
525
100</font>
526
</td><td>Blending factor (0-100)</td></tr>
527
528
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
529
$aStdSize</font>
530
531
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
532
3</font>
533
</td><td>Which original size of flag image to use</td></tr>
534
 
535
536
 
537
538
Before this method can be used make sure that the file "jpgraph_flags.php" is included in the script.
539
540
All supported countries can be specified by setting the '$aFlag" parameter to either
541
 
542
<li> Numeric index, (0-238)
543
 
544
<li> The unique string index for the country
545
</ol>
546
 
547
For a list of all available flags please run the file "listallflags.php" in the Example directory.
548
 
549
The parameter "$aMix" is a value between 0-100 and specifies the blend factor for the flag.
550
<p>
551
 
552
<ol>
553
 
554
<li>FLAGSIZE2, corresponds to an original flag size of 60x60',
555
<li>FLAGSIZE3, corresponds to an original flag size of 100x100',
556
 
557
</ol>
558
559
For best result always use an original flag that is at least as big as the size that is wanted, i.e. even though the scaling factor can be used to arbitrary change the size of any of these original flags the result when up scaling is not optimal since there is a need to interpolate. By starting with a larger original image which is the downsampled the result is much better.
560
 
561
Note 1: In order to lock either the height or the width of the flag to a specific value use the SetImageConstrain()
562
method.
563
 
564
565
&nbsp;<br>
566
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETIMAGE">GTextTable::SetImage</a>
567
 
568
//&nbsp;Set&nbsp;one&nbsp;row&nbsp;with&nbsp;a&nbsp;number&nbsp;of&nbsp;country&nbsp;flags&nbsp;and&nbsp;constrain
<br />//&nbsp;the&nbsp;height&nbsp;to&nbsp;be&nbsp;20&nbsp;pixels
<br />$countries&nbsp;=&nbsp;array('united&nbsp;states','united&nbsp;kingdom','french&nbsp;republic','denmark','iceland','canada');
<br />$n&nbsp;=&nbsp;count($countries);
<br />for($i=0;&nbsp;$i&nbsp;&lt;&nbsp;$n;&nbsp;++$i&nbsp;)&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;$table-&gt;SetCellCountryFlag(1,$i+1,$countries[$i]);
<br />&nbsp;&nbsp;&nbsp;&nbsp;$table-&gt;SetCellImageConstrain(1,$i+1,TIMG_HEIGHT,20);
<br />}</font>
569
</span><br>
570
 
571
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCELLCSIMTARGET"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
572
function&nbsp;SetCellCSIMTarget($aRow,$aCol,$aTarget,$aAlt)</font>
573
</b></div></a></span>
574
575
 
576
577
 
578
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
579
 
580
$aRow</font>
581
582
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Row index</td></tr>
583
584
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
585
$aCol</font>
586
 
587
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Column index</td></tr>
588
589
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
590
$aTarget</font>
591
592
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Target URL</td></tr>
593
594
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
595
$aAlt</font>
596
597
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
598
 
599
</td><td>ALT text</td></tr>
600
</table>
601
602
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify URL and optional ALT text for CSIM target for the specified cell.
603
 
604
 
605
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
606
$table-&gt;SetCellCSIMTarget(3,0,'detail.php','View&nbsp;detailes');</font>
607
</span><br>
608
<p>
609
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCELLFILLCOLOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
610
function&nbsp;SetCellFillColor($aRow,$aCol,$aColor)</font>
611
</b></div></a></span>
612
613
<span style='font-family:arial;font-size:90%;'><i>Specify background color in a cell</i></span><p>
614
615
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
616
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
617
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
618
$aRow</font>
619
620
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Row index</td></tr>
621
 
622
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
623
 
624
625
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Column index</td></tr>
626
627
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
628
 
629
630
 
631
</table>
632
633
 
634
635
 
636
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETFILLCOLOR">GTextTable::SetFillColor</a>, <a href="GTextTable.html#_GTEXTTABLE_SETROWFILLCOLOR">GTextTable::SetRowFillColor</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLFILLCOLOR">GTextTable::SetColFillColor</a>
637
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
638
 
639
</span><br>
640
 
641
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCELLFONT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
642
function&nbsp;SetCellFont($aRow,$aCol,$aFF,$aFS,$aFSize)</font>
643
 
644
645
<span style='font-family:arial;font-size:90%;'><i>Specify font family and style for a specific cell</i></span><p>
646
647
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
648
 
649
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
650
$aRow</font>
651
652
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Row index</td></tr>
653
654
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
655
$aCol</font>
656
657
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Column index</td></tr>
658
659
 
660
$aFF</font>
661
 
662
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Font family</td></tr>
663
664
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
665
$aFS</font>
666
 
667
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Font style</td></tr>
668
 
669
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
670
$aFSize</font>
671
 
672
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
673
 
674
</td><td>Font size</td></tr>
675
</table>
676
 
677
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify font family and style for a specific cell.
678
679
 
680
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETFONT">GTextTable::SetFont</a>, <a href="GTextTable.html#_GTEXTTABLE_SETROWFONT">GTextTable::SetRowFont</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLFONT">GTextTable::SetColFont</a>
681
 
682
//&nbsp;Highlight&nbsp;cell&nbsp;(4,1)&nbsp;with&nbsp;red&nbsp;on&nbsp;yellow&nbsp;background
<br />$table-&gt;SetCellFillColor(4,1,'yellow');
<br />$table-&gt;SetCellColor(4,1,'darkred');
<br />$table-&gt;SetCellFont(4,1,FF_ARIAL,FS_BOLD,12);</font>
683
</span><br>
684
<p>
685
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCELLIMAGE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
686
function&nbsp;SetCellImage($aRow,$aCol,$aFile,$aScale,$aMix)</font>
687
</b></div></a></span>
688
689
<span style='font-family:arial;font-size:90%;'><i>Set a background image in the specified cell</i></span><p>
690
691
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
692
 
693
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
694
 
695
696
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Row index</td></tr>
697
698
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
699
 
700
701
 
702
703
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
704
 
705
706
 
707
708
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
709
 
710
711
 
712
1.0</font>
713
</td><td>Image scale factor</td></tr>
714
 
715
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
716
 
717
718
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
719
 
720
</td><td>Blending factor (0-100)</td></tr>
721
</table>
722
723
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set a background image in the specified cell. The image is stored in the file with the name given as the third parameter.
724
 
725
The image name must end with a valid image prefix, i.e. one of ".png", ".jpg" or possibly ".gif"
726
 
727
Note: To set a default background image for all cells in the table use the SetImage() method.&nbsp;<br>
728
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETIMAGE">GTextTable::SetImage</a>, <a href="GTextTable.html#_GTEXTTABLE_SETROWIMAGE">GTextTable::SetRowImage</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLIMAGE">GTextTable::SetColImage</a>
729
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
730
//&nbsp;Put&nbsp;the&nbsp;image&nbsp;'warning.jpg'&nbsp;in&nbsp;cell&nbsp;(3,6)&nbsp;and
<br />//&nbsp;scale&nbsp;the&nbsp;image&nbsp;to&nbsp;half&nbsp;size
<br />$table-&gt;SetCellImage(3,6,'warning.jpg',0.5);</font>
731
</span><br>
732
<p>
733
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCELLIMAGECONSTRAIN"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
734
function&nbsp;SetCellImageConstrain($aRow,$aCol,$aType,$aVal)</font>
735
</b></div></a></span>
736
737
<span style='font-family:arial;font-size:90%;'><i>Lock either the image height or width in a particular cell</i></span><p>
738
739
 
740
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
741
 
742
$aRow</font>
743
744
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Row index</td></tr>
745
746
 
747
$aCol</font>
748
 
749
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Column index</td></tr>
750
751
 
752
$aType</font>
753
 
754
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Specify width or height constrain</td></tr>
755
756
 
757
$aVal</font>
758
 
759
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Value of constrain</td></tr>
760
</table>
761
 
762
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Use this method to locj either the width or height of the image ina a cell. The non-specified image width or height will be automatically determied so that the orignal propertion of the image is maintained.
763
764
The $aType parameter is used to indicate if the value given should be interpretated as width or height constarin and is specifed as either
765
 
766
<li> TIMG_WIDTH, Interpret as width
767
<li> TIMG_HEIGHT,Interpret as height
768
 
769
<br>
770
<div style="font-weight:bold;font-family:arial;font-size:85%;">Returns</div>VOID<br>
771
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETCELLIMAGE">GTextTable::SetCellImage</a>
772
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
773
 
774
</span><br>
775
 
776
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCELLNUMBERFORMAT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
777
 
778
</b></div></a></span>
779
780
<span style='font-family:arial;font-size:90%;'><i>Set number format in cell</i></span><p>
781
782
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
783
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
784
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
785
$aRow</font>
786
787
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Row index</td></tr>
788
789
 
790
$aCol</font>
791
 
792
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Column index</td></tr>
793
794
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
795
$aF</font>
796
 
797
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Format string</td></tr>
798
 
799
800
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set number format in cell. The number format should be given in the style of printf() family format strings. A cell that contains non numeric data will not be affected in any way by this method.
801
 
802
Note: It is the resposnibility of the client to make any necessary rounding of the numbers.&nbsp;<br>
803
 
804
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
805
//&nbsp;Use&nbsp;two&nbsp;decimals&nbsp;with&nbsp;leading&nbsp;0&nbsp;on&nbsp;numbers
<br />$this-&gt;SetCellNumberFormat(3,1,'%0.2f');</font>
806
 
807
<p>
808
 
809
function&nbsp;SetCellPadding($aRow,$aCol,$aPad)</font>
810
</b></div></a></span>
811
 
812
<span style='font-family:arial;font-size:90%;'><i>Set internal cell margin</i></span><p>
813
814
 
815
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
816
 
817
$aRow</font>
818
819
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Row index</td></tr>
820
821
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
822
$aCol</font>
823
824
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Column index</td></tr>
825
826
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
827
$aPad</font>
828
829
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Internal cell margin (in pixels)</td></tr>
830
</table>
831
832
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set internal cell margins in pixels.
833
834
 
835
836
 
837
838
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
839
//&nbsp;Set&nbsp;8&nbsp;pixel&nbsp;cell&nbsp;padding&nbsp;for&nbsp;cell&nbsp;(1,3)
<br />$table-&gt;SerCellPadding(3,1,8);</font>
840
</span><br>
841
 
842
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCOLALIGN"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
843
 
844
</b></div></a></span>
845
846
 
847
848
 
849
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
850
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
851
 
852
853
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Column index</td></tr>
854
 
855
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
856
 
857
858
 
859
860
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
861
$aVertAlign</font>
862
863
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
864
'bottom'</font>
865
</td><td>Vertical alignment</td></tr>
866
</table>
867
 
868
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set cell alignment for an entire column of cells. The alignment can be specifed both horizontally and vertically.
869
 
870
The possible settings for horizontal alignment are
871
"left", "center", "right"
872
873
Vertical alignment can be set as
874
 
875
876
 
877
878
Note2: In order to set the default alignment for all cells in the table use the SetAlign() method.&nbsp;<br>
879
 
880
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
881
 
882
</span><br>
883
<p>
884
 
885
function&nbsp;SetColColor($aCol,$aColor)</font>
886
</b></div></a></span>
887
 
888
<span style='font-family:arial;font-size:90%;'><i>Set font color for a entire column.</i></span><p>
889
 
890
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
891
 
892
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
893
 
894
895
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Column index</td></tr>
896
897
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
898
$aColor</font>
899
900
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Font color</td></tr>
901
</table>
902
 
903
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set font color for a entire column.
904
 
905
Note: To set the default color for all cells use the SetColor() method.&nbsp;<br>
906
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETCOLOR">GTextTable::SetColor</a>, <a href="GTextTable.html#_GTEXTTABLE_SETCELLCOLOR">GTextTable::SetCellColor</a> and <a href="GTextTable.html#_GTEXTTABLE_SETROWCOLOR">GTextTable::SetRowColor</a>
907
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
908
$table-&gt;SetColColor(2,'blue');</font>
909
 
910
<p>
911
 
912
function&nbsp;SetColFillColor($aCol,$aColor)</font>
913
</b></div></a></span>
914
 
915
<span style='font-family:arial;font-size:90%;'><i>Specify background color in an entire column of cells</i></span><p>
916
 
917
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
918
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
919
 
920
$aCol</font>
921
922
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Column index</td></tr>
923
924
 
925
$aColor</font>
926
 
927
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Background color</td></tr>
928
</table>
929
 
930
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify background color in an entire column of cells.
931
932
 
933
<br>
934
 
935
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETCELLFILLCOLOR">GTextTable::SetCellFillColor</a>, <a href="GTextTable.html#_GTEXTTABLE_SETFILLCOLOR">GTextTable::SetFillColor</a> and <a href="GTextTable.html#_GTEXTTABLE_SETROWFILLCOLOR">GTextTable::SetRowFillColor</a>
936
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
937
//&nbsp;Highlight&nbsp;column&nbsp;3&nbsp;with&nbsp;white&nbsp;text&nbsp;on&nbsp;gray&nbsp;bakground
<br />$table-&gt;SetColFillColor(3,'darkgray');
<br />$table-&gt;SetColColor(3,'white');</font>
938
</span><br>
939
<p>
940
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCOLFONT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
941
function&nbsp;SetColFont($aCol,$aFF,$aFS,$aFSize)</font>
942
</b></div></a></span>
943
944
 
945
946
 
947
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
948
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
949
$aCol</font>
950
951
 
952
953
 
954
$aFF</font>
955
956
 
957
958
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
959
 
960
961
 
962
963
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
964
$aFSize</font>
965
966
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
967
10</font>
968
</td><td>Font size</td></tr>
969
</table>
970
971
 
972
973
 
974
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETFONT">GTextTable::SetFont</a>, <a href="GTextTable.html#_GTEXTTABLE_SETROWFONT">GTextTable::SetRowFont</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCELLFONT">GTextTable::SetCellFont</a>
975
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
976
$table-&gt;SetColFont(0,FF_ARIAL,FS_NORMAL,12);</font>
977
</span><br>
978
 
979
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCOLGRID"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
980
 
981
</b></div></a></span>
982
983
 
984
985
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
986
 
987
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
988
 
989
990
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Grind line to specify</td></tr>
991
992
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
993
$aWeight</font>
994
995
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
996
1</font>
997
</td><td>Width of line</td></tr>
998
999
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1000
$aColor</font>
1001
1002
 
1003
'black'</font>
1004
 
1005
1006
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1007
$aStyle</font>
1008
1009
 
1010
TGRID_SINGLE</font>
1011
 
1012
</table>
1013
1014
 
1015
<p>
1016
 
1017
<ol>
1018
<li><b>TGRID_SINGLE</b>, Single solid line of the given color and weight
1019
 
1020
<li><b>TGRID_DOUBLE2</b>, Two solid lines of the given color. The first line has twice the weight as the second. This type of line is often used to mark a summation line in a table.
1021
 
1022
1023
Note: In order to remove all grid lines in the table set the width to 0.
1024
 
1025
1026
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1027
$table-&gt;SetColGrid(1,1,'black',TGRID_DOUBLE2);
<br /></font>
1028
</span><br>
1029
 
1030
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCOLIMAGE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1031
 
1032
</b></div></a></span>
1033
1034
<span style='font-family:arial;font-size:90%;'><i>Set background image for an entire column of cells</i></span><p>
1035
1036
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1037
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1038
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1039
$aCol</font>
1040
1041
 
1042
1043
 
1044
$aFile</font>
1045
1046
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Filename of image</td></tr>
1047
1048
 
1049
$aScale</font>
1050
 
1051
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1052
1.0</font>
1053
 
1054
1055
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1056
$aMix</font>
1057
 
1058
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1059
100</font>
1060
 
1061
</table>
1062
1063
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set background image for an entire column of cells. The should be stored in a file whos filename is given as the second parameter. The scdaling factor can be specifed as an arbitary floating point value between 0-1.
1064
 
1065
The Blend factor is specified as an integer between 0 and 100 where 100 is 100% blend factor.
1066
&nbsp;<br>
1067
 
1068
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1069
$table-&gt;SetColImage(2,$imageFileNmae,0.7);</font>
1070
</span><br>
1071
<p>
1072
 
1073
function&nbsp;SetColNumberFormat($aCol,$aF)</font>
1074
</b></div></a></span>
1075
1076
<span style='font-family:arial;font-size:90%;'><i>Set number format in an entire column of cells</i></span><p>
1077
1078
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1079
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1080
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1081
 
1082
1083
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Column index</td></tr>
1084
 
1085
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1086
$aF</font>
1087
1088
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Format string</td></tr>
1089
</table>
1090
1091
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set number format in an entire column of cells. The number format should be given in the style of printf() family format strings. A cell that contains non numeric data will not be affected in any way by this method.
1092
1093
 
1094
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETCELLNUMBERFORMAT">GTextTable::SetCellNumberFormat</a>, <a href="GTextTable.html#_GTEXTTABLE_SETNUMBERFORMAT">GTextTable::SetNumberFormat</a> and <a href="GTextTable.html#_GTEXTTABLE_SETROWNUMBERFORMAT">GTextTable::SetRowNumberFormat</a>
1095
 
1096
//&nbsp;Use&nbsp;two&nbsp;decimals&nbsp;with&nbsp;leading&nbsp;zero
<br />$table-&gt;SetColNumberFormat(4,'%0.2f');</font>
1097
</span><br>
1098
<p>
1099
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCOLOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1100
 
1101
</b></div></a></span>
1102
 
1103
<span style='font-family:arial;font-size:90%;'><i>Set font color for the whole table or a range of cells.</i></span><p>
1104
1105
 
1106
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1107
 
1108
$aArgR1</font>
1109
1110
 
1111
1112
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1113
$aC1</font>
1114
 
1115
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1116
null</font>
1117
 
1118
1119
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1120
$aR2</font>
1121
1122
 
1123
null</font>
1124
</td><td>Bottom right row</td></tr>
1125
1126
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1127
$aC2</font>
1128
1129
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1130
null</font>
1131
</td><td>Bottom right column</td></tr>
1132
1133
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1134
$aArg</font>
1135
 
1136
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1137
 
1138
</td><td>Font color</td></tr>
1139
</table>
1140
1141
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set font color for the whol table or a range of cells.
1142
 
1143
<ul>
1144
 
1145
<li><b>SetColor($aR1,$aC1,$aR2,$aC2,$aColor)</b>, Set the font color for a range of cells specified by the top left and bottom right cell.
1146
</ul>
1147
 
1148
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETCELLCOLOR">GTextTable::SetCellColor</a>, <a href="GTextTable.html#_GTEXTTABLE_SETROWCOLOR">GTextTable::SetRowColor</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLCOLOR">GTextTable::SetColColor</a>
1149
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1150
 
1151
</span><br>
1152
 
1153
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETCOLPADDING"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1154
function&nbsp;SetColPadding($aCol,$aPad)</font>
1155
</b></div></a></span>
1156
1157
<span style='font-family:arial;font-size:90%;'><i>Set internal cell margins in pixels for all cells in the specified column.</i></span><p>
1158
1159
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1160
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1161
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1162
$aCol</font>
1163
 
1164
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Column index</td></tr>
1165
 
1166
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1167
$aPad</font>
1168
1169
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Internal cell margin</td></tr>
1170
 
1171
1172
 
1173
1174
By default the internal cell padding is 5 pixels.
1175
 
1176
Note: To change the default cell padding for all cells in the table use the Setpadding() method.&nbsp;<br>
1177
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETCELLPADDING">GTextTable::SetCellPadding</a>, <a href="GTextTable.html#_GTEXTTABLE_SETPADDING">GTextTable::SetPadding</a> and <a href="GTextTable.html#_GTEXTTABLE_SETROWPADDING">GTextTable::SetRowPadding</a>
1178
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1179
 
1180
</span><br>
1181
<p>
1182
 
1183
function&nbsp;SetCSIMTarget($aTarget,$aAlt,$aAutoTarget)</font>
1184
</b></div></a></span>
1185
1186
 
1187
1188
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1189
 
1190
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1191
$aTarget</font>
1192
1193
 
1194
1195
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1196
 
1197
1198
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1199
null</font>
1200
</td><td>ALT etxt</td></tr>
1201
 
1202
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1203
$aAutoTarget</font>
1204
1205
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1206
false</font>
1207
</td><td>TRUE=Append auto row and column argument</td></tr>
1208
</table>
1209
1210
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set URL CSIM target for all cells in the table. If the $aAutoTarget is set to TRUE then an additional GET method argument will be appended to the base URL. This makes it possible to spcify a base URL which will then be called with the two additional arguments "row" and "col". This can be used to determien from which cell the click was made.
1211
<p>
1212
An example will clarify this.
1213
<p>
1214
Assume that the base URL is "target.php". If we then setup the table with
1215
1216
$table->SetCSIMTarget('target.php','Click for details',true);
1217
1218
then if the user clicks the cell (1,1) the url called will be  "target.php?row=1&col=1", for cell (2,3) the call would be "target.php?row=2&col=3" and so on.
1219
&nbsp;<br>
1220
1221
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1222
 
1223
</span><br>
1224
 
1225
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETFILLCOLOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1226
function&nbsp;SetFillColor($aArgR1,$aC1,$aR2,$aC2,$aArg)</font>
1227
</b></div></a></span>
1228
1229
 
1230
1231
 
1232
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1233
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1234
 
1235
1236
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Top left row OR color</td></tr>
1237
 
1238
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1239
 
1240
1241
 
1242
null</font>
1243
</td><td>Top left column</td></tr>
1244
1245
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1246
$aR2</font>
1247
1248
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1249
null</font>
1250
</td><td>Bottom right row</td></tr>
1251
 
1252
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1253
 
1254
1255
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1256
null</font>
1257
</td><td>Bottom right column</td></tr>
1258
 
1259
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1260
 
1261
1262
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1263
 
1264
</td><td>Color for range</td></tr>
1265
</table>
1266
1267
 
1268
1269
This method is polymorphic and can be called in two ways
1270
 
1271
<li><b>SetFillColor($aFillColor)</b>, Set fill color for all cells in the table
1272
<li> <b>SetFillColor($aR1,$aC1,$aR2,$aC2,$aFillColor)</b>, Set fill color for a range of cells
1273
</ol>
1274
&nbsp;<br>
1275
 
1276
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1277
//&nbsp;Set&nbsp;default&nbsp;fill&nbsp;color&nbsp;for&nbsp;entire&nbsp;table
<br />$table-&gt;SetFillColor('lightgray');
<br />
<br />//&nbsp;Highlight&nbsp;top&nbsp;left&nbsp;2x2&nbsp;cells
<br />$table-&gt;SetFillColor(0,0,1,1,'yellow');
<br /></font>
1278
</span><br>
1279
<p>
1280
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETFONT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1281
 
1282
</b></div></a></span>
1283
 
1284
<span style='font-family:arial;font-size:90%;'><i>Set font for entire table or range of cells.</i></span><p>
1285
<br>
1286
 
1287
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set font for entire table or range of cells. This si a polymorphic method and can be called in two ways-
1288
<ol>
1289
<li><b>SetFont($aFF,$aFS,$aFSize)</b>, Set default font for entire table
1290
<li><b>SetFont($aR1,$aC1,$aR2,$aC2,$aFF,$aFS,$aFSize)</b>, Set default font for range of cells table
1291
</ol>
1292
&nbsp;<br>
1293
<br>
1294
<div style="font-weight:bold;font-family:arial;font-size:85%;">Returns</div>VOID<br>
1295
 
1296
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1297
 
1298
</span><br>
1299
<p>
1300
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETGRID"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1301
function&nbsp;SetGrid($aWeight,$aColor,$aStyle)</font>
1302
 
1303
1304
 
1305
1306
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1307
 
1308
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1309
$aWeight</font>
1310
1311
 
1312
1</font>
1313
</td><td>Width of grid lines</td></tr>
1314
 
1315
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1316
$aColor</font>
1317
1318
 
1319
'black'</font>
1320
</td><td>Color of grid lines</td></tr>
1321
 
1322
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1323
$aStyle</font>
1324
1325
 
1326
TGRID_SINGLE</font>
1327
</td><td>Style of grid lines</td></tr>
1328
 
1329
1330
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set style, color and width of all table grid lines. The grid lines are defined as the internal lines in the table. The outer border of the table is controlled separately with the SetBorder() method.
1331
<p>
1332
The style for the grid lines can be one of the following three
1333
 
1334
<li><b>TGRID_SINGLE</b>, Single solid line of the given color and weight
1335
 
1336
<li><b>TGRID_DOUBLE2</b>, Two solid lines of the given color. The first line has twice the weight as the second. This type of line is often used to mark a summation line in a table.
1337
</ol>
1338
1339
Note: In order to remove all grid lines in the table set the width to 0.
1340
&nbsp;<br>
1341
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETCOLGRID">GTextTable::SetColGrid</a> and <a href="GTextTable.html#_GTEXTTABLE_SETROWGRID">GTextTable::SetRowGrid</a>
1342
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1343
//&nbsp;Set&nbsp;the&nbsp;default&nbsp;grid&nbsp;lines&nbsp;for&nbsp;whole&nbsp;table
<br />$table-&gt;SetGrid(1,'gray',TGRID_SOLID);</font>
1344
</span><br>
1345
<p>
1346
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETIMAGE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1347
function&nbsp;SetImage($aFileR1,$aScaleC1,$aMixR2,$aC2,$aFile,$aScale,$aMix)</font>
1348
</b></div></a></span>
1349
1350
<span style='font-family:arial;font-size:90%;'><i>Set background image for an entire range of cells or entire table</i></span><p>
1351
1352
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1353
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1354
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1355
 
1356
1357
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Top left row OR file name</td></tr>
1358
 
1359
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1360
$aScaleC1</font>
1361
1362
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1363
null</font>
1364
</td><td>Top left column OR scale</td></tr>
1365
1366
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1367
$aMixR2</font>
1368
1369
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1370
null</font>
1371
</td><td>Bottom right row OR blend factor</td></tr>
1372
1373
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1374
$aC2</font>
1375
1376
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1377
null</font>
1378
</td><td>Bottom right column</td></tr>
1379
1380
 
1381
$aFile</font>
1382
 
1383
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1384
null</font>
1385
</td><td>Image filename</td></tr>
1386
1387
 
1388
$aScale</font>
1389
1390
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1391
 
1392
</td><td>Image scale</td></tr>
1393
1394
 
1395
$aMix</font>
1396
1397
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1398
 
1399
</td><td>Blend factor (0-100)</td></tr>
1400
</table>
1401
 
1402
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set background image for an entire rnage of cells or entire table. The should be stored in a file whos filename is given as the second parameter. The scdaling factor can be specifed as an arbitary floating point value between 0-1.
1403
<p>
1404
The Blend factor is specified as an integer between 0 and 100 where 100 is 100% blend factor.&nbsp;<br>
1405
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETCELLIMAGE">GTextTable::SetCellImage</a>, <a href="GTextTable.html#_GTEXTTABLE_SETROWIMAGE">GTextTable::SetRowImage</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLIMAGE">GTextTable::SetColImage</a>
1406
 
1407
//&nbsp;Set&nbsp;the&nbsp;same&nbsp;background&nbsp;image&nbsp;for&nbsp;all&nbsp;cells&nbsp;in&nbsp;the&nbsp;table
<br />$table-&gt;SetImage($fileName,0.8);
<br />
<br />//&nbsp;Set&nbsp;the&nbsp;background&nbsp;image&nbsp;for&nbsp;the&nbsp;top&nbsp;2x2&nbsp;cells
<br />$table-&gt;SetImage(0,0,1,1,$fileName,0.8);
<br /></font>
1408
</span><br>
1409
<p>
1410
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETMINCOLWIDTH"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1411
function&nbsp;SetMinColWidth($aColWidth,$aWidth)</font>
1412
</b></div></a></span>
1413
1414
<span style='font-family:arial;font-size:90%;'><i>Specify minimum column width</i></span><p>
1415
 
1416
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1417
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1418
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1419
$aColWidth</font>
1420
1421
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Width or column index</td></tr>
1422
1423
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1424
$aWidth</font>
1425
1426
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1427
 
1428
</td><td>Width</td></tr>
1429
 
1430
1431
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify minimum column width of all columns or a specific column. The method is polymorphic and can be called in two different ways.
1432
<ol>
1433
<li><b>SetMinColWidth($aWidth)</b>, Set the minimum width for all columns in the table
1434
 
1435
</ol>
1436
 
1437
Note that the column width will always be wide enough to hold the widest text or image. This means that the table will never to adny clipping of data.&nbsp;<br>
1438
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETMINROWHEIGHT">GTextTable::SetMinRowHeight</a>
1439
 
1440
//&nbsp;Make&nbsp;all&nbsp;columns&nbsp;at&nbsp;least&nbsp;50&nbsp;pixels&nbsp;wide
<br />$table-&gt;SetMinColWidth(50);</font>
1441
</span><br>
1442
<p>
1443
 
1444
function&nbsp;SetMinRowHeight($aRowHeight,$aHeight)</font>
1445
</b></div></a></span>
1446
 
1447
<span style='font-family:arial;font-size:90%;'><i>Specify minimum row height of all rows or a specific row. </i></span><p>
1448
1449
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1450
 
1451
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1452
$aRowHeight</font>
1453
 
1454
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Row index or height</td></tr>
1455
1456
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1457
 
1458
1459
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1460
 
1461
</td><td>Height</td></tr>
1462
</table>
1463
1464
 
1465
<ol>
1466
<li><b>SetMinRowHeight($aWidth)</b>, Set the minimum height for all rows in the table
1467
 
1468
</ol>
1469
1470
Note that the row height will always be tall enough to hold the highest text or image. This means that the table will never to adny clipping of the data.&nbsp;<br>
1471
 
1472
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1473
//&nbsp;Make&nbsp;the&nbsp;top&nbsp;row&nbsp;at&nbsp;least&nbsp;40&nbsp;pixels&nbsp;in&nbsp;height
<br />$table-&gt;SetMinRowHeight(0,40);</font>
1474
 
1475
<p>
1476
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETNUMBERFORMAT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1477
function&nbsp;SetNumberFormat($aArgR1,$aC1,$aR2,$aC2,$aArg)</font>
1478
</b></div></a></span>
1479
 
1480
<span style='font-family:arial;font-size:90%;'><i>Set number format for entire table or a range of cells.</i></span><p>
1481
1482
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1483
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1484
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1485
$aArgR1</font>
1486
1487
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Top left row OR format string</td></tr>
1488
1489
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1490
$aC1</font>
1491
1492
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1493
null</font>
1494
</td><td>Top left column</td></tr>
1495
1496
 
1497
$aR2</font>
1498
 
1499
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1500
null</font>
1501
</td><td>Bottom right row</td></tr>
1502
1503
 
1504
$aC2</font>
1505
 
1506
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1507
null</font>
1508
 
1509
1510
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1511
$aArg</font>
1512
1513
 
1514
null</font>
1515
</td><td>Format string</td></tr>
1516
</table>
1517
1518
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set number format for entire table or a range of cells. The number format should be given in the style of printf() family format strings. A cell that contains non numeric data will not be affected in any way by this method.
1519
 
1520
The method is polymorphic and can be called in two ways
1521
<ol>
1522
<li><b>SetNumberFormat($aFormat)</b>, Set the number format for the entire table
1523
<li><b>SetNumberFormat($aFormat)</b>, Set the number format for a range of cells
1524
</ol>
1525
1526
Note: It is the resposnibility of the client to make any necessary rounding of the numbers.&nbsp;<br>
1527
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETCELLNUMBERFORMAT">GTextTable::SetCellNumberFormat</a>, <a href="GTextTable.html#_GTEXTTABLE_SETROWNUMBERFORMAT">GTextTable::SetRowNumberFormat</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLNUMBERFORMAT">GTextTable::SetColNumberFormat</a>
1528
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1529
$table-&gt;SetNumberFormat('%0.2f');</font>
1530
 
1531
<p>
1532
 
1533
function&nbsp;SetPadding($aArgR1,$aC1,$aR2,$aC2,$aPad)</font>
1534
</b></div></a></span>
1535
1536
<span style='font-family:arial;font-size:90%;'><i>Set internal cell margins for all cells in the specified range or entire table</i></span><p>
1537
 
1538
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1539
 
1540
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1541
$aArgR1</font>
1542
 
1543
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Top left row OR cell padding</td></tr>
1544
1545
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1546
$aC1</font>
1547
 
1548
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1549
null</font>
1550
</td><td>Top left column</td></tr>
1551
1552
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1553
 
1554
1555
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1556
null</font>
1557
</td><td>Bottom right row</td></tr>
1558
1559
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1560
$aC2</font>
1561
1562
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1563
null</font>
1564
 
1565
1566
 
1567
$aPad</font>
1568
1569
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1570
null</font>
1571
 
1572
</table>
1573
 
1574
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set internal cell margins for all cells in the specified range or entire table
1575
1576
 
1577
1578
This method is polymorphic and can be called in two ways
1579
<ol>
1580
 
1581
<li><b>SetPadding($aR1,$aC1,$aR2,$aC2,$aPadding)</b>, Set padding for the specified range of cells
1582
</ol>
1583
 
1584
&nbsp;<br>
1585
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETCELLPADDING">GTextTable::SetCellPadding</a>, <a href="GTextTable.html#_GTEXTTABLE_SETCOLPADDING">GTextTable::SetColPadding</a> and <a href="GTextTable.html#_GTEXTTABLE_SETROWPADDING">GTextTable::SetRowPadding</a>
1586
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1587
 
1588
</span><br>
1589
<p>
1590
 
1591
function&nbsp;SetPos($aX,$aY)</font>
1592
</b></div></a></span>
1593
1594
 
1595
1596
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1597
 
1598
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1599
$aX</font>
1600
1601
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>X Coordinate of top left corner</td></tr>
1602
 
1603
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1604
 
1605
1606
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Y Coordinate of top left corner</td></tr>
1607
</table>
1608
1609
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set absolute pixel position for top left corner of the table. This is the simplest way of positioning a table in the graph area.
1610
 
1611
Note: The anchor position of the table can also be adjusted by the method SetAnchorPos(). By deagule the top left corner of the table is aligned with the specified coordinates.&nbsp;<br>
1612
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETSCALEPOS">GTextTable::SetScalePos</a>
1613
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1614
$table-&gt;SetPos(10,10);</font>
1615
</span><br>
1616
<p>
1617
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETROWALIGN"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1618
function&nbsp;SetRowAlign($aRow,$aHorAlign,$aVertAlign)</font>
1619
</b></div></a></span>
1620
 
1621
<span style='font-family:arial;font-size:90%;'><i>Set cell alignment for an entire row of cells.</i></span><p>
1622
 
1623
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1624
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1625
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1626
$aRow</font>
1627
 
1628
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Row index</td></tr>
1629
 
1630
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1631
$aHorAlign</font>
1632
 
1633
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Horizontal alignment</td></tr>
1634
1635
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1636
 
1637
1638
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1639
 
1640
</td><td>Vertical alignment</td></tr>
1641
</table>
1642
1643
 
1644
1645
The possible settings for horizontal alignment are
1646
 
1647
1648
Vertical alignment can be set as
1649
"top","center","bottom"
1650
 
1651
Note that the alignment options are specified as strings.
1652
1653
 
1654
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETALIGN">GTextTable::SetAlign</a>, <a href="GTextTable.html#_GTEXTTABLE_SETCELLALIGN">GTextTable::SetCellAlign</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLALIGN">GTextTable::SetColAlign</a>
1655
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1656
$table-&gt;SetRowAlign(6,'right');</font>
1657
</span><br>
1658
 
1659
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETROWCOLOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1660
 
1661
</b></div></a></span>
1662
 
1663
<span style='font-family:arial;font-size:90%;'><i>Set font color for an entire row.</i></span><p>
1664
1665
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1666
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1667
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1668
 
1669
1670
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Row index</td></tr>
1671
1672
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1673
$aColor</font>
1674
1675
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Font color</td></tr>
1676
</table>
1677
1678
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set font color for an entire row.
1679
1680
Note: To set the default color for all cells use the SetColor() method.&nbsp;<br>
1681
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETCOLOR">GTextTable::SetColor</a>, <a href="GTextTable.html#_GTEXTTABLE_SETCELLCOLOR">GTextTable::SetCellColor</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLCOLOR">GTextTable::SetColColor</a>
1682
 
1683
$table-&gt;SetRowColor(5,'red');</font>
1684
 
1685
<p>
1686
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETROWFILLCOLOR"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1687
function&nbsp;SetRowFillColor($aRow,$aColor)</font>
1688
</b></div></a></span>
1689
 
1690
<span style='font-family:arial;font-size:90%;'><i>Specify background color in an entire row of cells.</i></span><p>
1691
 
1692
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1693
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1694
 
1695
$aRow</font>
1696
1697
 
1698
1699
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1700
$aColor</font>
1701
1702
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Background color</td></tr>
1703
</table>
1704
1705
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify background color in an entire row of cells.
1706
1707
Note: To set the default background fill color for all cells usde the SetFillColor() method.&nbsp;<br>
1708
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETFILLCOLOR">GTextTable::SetFillColor</a>, <a href="GTextTable.html#_GTEXTTABLE_SETCELLFILLCOLOR">GTextTable::SetCellFillColor</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLFILLCOLOR">GTextTable::SetColFillColor</a>
1709
 
1710
//&nbsp;Highlight&nbsp;row&nbsp;0&nbsp;with&nbsp;white&nbsp;text&nbsp;on&nbsp;gray&nbsp;bakground
<br />$table-&gt;SetRowFillColor(0,'darkgray');
<br />$table-&gt;SetRowColor(0,'white');</font>
1711
 
1712
<p>
1713
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETROWFONT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1714
function&nbsp;SetRowFont($aRow,$aFF,$aFS,$aFSize)</font>
1715
</b></div></a></span>
1716
 
1717
<span style='font-family:arial;font-size:90%;'><i>Specify font family and style for an entire row of cells</i></span><p>
1718
 
1719
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1720
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1721
 
1722
$aRow</font>
1723
 
1724
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Row index</td></tr>
1725
1726
 
1727
$aFF</font>
1728
1729
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Font family</td></tr>
1730
1731
 
1732
$aFS</font>
1733
 
1734
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Font style</td></tr>
1735
1736
 
1737
$aFSize</font>
1738
1739
 
1740
10</font>
1741
 
1742
</table>
1743
1744
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Specify font family and style for an entire row of cells
1745
1746
Note:To set the default font for all cells use the SetFont() method.&nbsp;<br>
1747
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETFONT">GTextTable::SetFont</a>, <a href="GTextTable.html#_GTEXTTABLE_SETCELLFONT">GTextTable::SetCellFont</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLFONT">GTextTable::SetColFont</a>
1748
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1749
$table-&gt;SetRowFont(0,FF_ARIAL,FS_NORMAL,12);</font>
1750
</span><br>
1751
 
1752
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETROWGRID"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1753
 
1754
</b></div></a></span>
1755
1756
<span style='font-family:arial;font-size:90%;'><i>Set style, color and width of a specified horizontal grid line</i></span><p>
1757
1758
 
1759
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1760
 
1761
$aRow</font>
1762
1763
 
1764
1765
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1766
 
1767
1768
 
1769
1</font>
1770
</td><td>Width of line</td></tr>
1771
1772
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1773
$aColor</font>
1774
1775
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1776
'black'</font>
1777
</td><td>Color of line</td></tr>
1778
 
1779
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1780
 
1781
1782
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1783
TGRID_SINGLE</font>
1784
</td><td>Grid line style (see below)</td></tr>
1785
 
1786
1787
 
1788
<p>
1789
The style for the grid lines can be one of the following three
1790
 
1791
<li><b>TGRID_SINGLE</b>, Single solid line of the given color and weight
1792
<li><b>TGRID_DOUBLE</b>, Two solid lines of the given color and weight. The distance between the lines is the same as the weight.
1793
 
1794
</ol>
1795
 
1796
Note: In order to remove a grid line in the table set the width to 0.
1797
&nbsp;<br>
1798
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETGRID">GTextTable::SetGrid</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLGRID">GTextTable::SetColGrid</a>
1799
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1800
//&nbsp;Add&nbsp;a&nbsp;double&nbsp;line&nbsp;of&nbsp;width=2&nbsp;to&nbsp;mark&nbsp;the&nbsp;summation&nbsp;row
<br />//&nbsp;in&nbsp;a&nbsp;atable
<br />$table-&gt;SetRowGrid(4,2,'black',TGRID_DOUBLE2);</font>
1801
</span><br>
1802
<p>
1803
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETROWIMAGE"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1804
function&nbsp;SetRowImage($aRow,$aFile,$aScale,$aMix)</font>
1805
</b></div></a></span>
1806
1807
 
1808
1809
 
1810
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1811
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1812
$aRow</font>
1813
1814
 
1815
1816
 
1817
$aFile</font>
1818
1819
 
1820
1821
 
1822
$aScale</font>
1823
1824
 
1825
1.0</font>
1826
 
1827
1828
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1829
 
1830
1831
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1832
100</font>
1833
</td><td>Blend factor for image (0-100)</td></tr>
1834
 
1835
1836
 
1837
<p>
1838
The Blend factor is specified as an integer between 0 and 100 where 100 is 100% blend factor.
1839
&nbsp;<br>
1840
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETIMAGE">GTextTable::SetImage</a>, <a href="GTextTable.html#_GTEXTTABLE_SETCELLIMAGE">GTextTable::SetCellImage</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLIMAGE">GTextTable::SetColImage</a>
1841
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1842
$table-&gt;SetRowImage(1,$fileName,0.5,60);</font>
1843
</span><br>
1844
<p>
1845
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETROWNUMBERFORMAT"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1846
 
1847
</b></div></a></span>
1848
 
1849
<span style='font-family:arial;font-size:90%;'><i>Set number format in an entire row of cells.</i></span><p>
1850
1851
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1852
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1853
 
1854
$aRow</font>
1855
 
1856
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Row index</td></tr>
1857
1858
 
1859
$aF</font>
1860
1861
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Format string</td></tr>
1862
 
1863
1864
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set number format in an entire row of cells. The number format should be given in the style of printf() family format strings. A cell that contains non numeric data will not be affected in any way by this method.
1865
 
1866
Note: It is the resposnibility of the client to make any necessary rounding of the numbers.&nbsp;<br>
1867
<br>
1868
<div style="font-weight:bold;font-family:arial;font-size:85%;">Returns</div>VOID<br>
1869
 
1870
<div style="font-weight:bold;font-family:arial;font-size:85%;"><p>Example</div><span style="font-family:courier;font-size:85%;"><font color="#000000">
1871
//&nbsp;Use&nbsp;2&nbsp;decimals&nbsp;with&nbsp;leading&nbsp;zero
<br />$table-&gt;SetRowNumberFormat('%0.2f');</font>
1872
 
1873
<p>
1874
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETROWPADDING"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1875
function&nbsp;SetRowPadding($aRow,$aPad)</font>
1876
</b></div></a></span>
1877
 
1878
<span style='font-family:arial;font-size:90%;'><i>Set internal cell margins in pixels for all cells in the specified row</i></span><p>
1879
1880
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1881
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1882
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1883
$aRow</font>
1884
1885
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Row index</td></tr>
1886
 
1887
<tr><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'><font color="#000000">
1888
$aPad</font>
1889
1890
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Internal cell margin</td></tr>
1891
</table>
1892
1893
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Set internal cell margins in pixels for all cells in the specified row.
1894
1895
By default the internal cell padding is 5 pixels.
1896
1897
Note: To change the default cell padding for all cells in the table use the Setpadding() method.&nbsp;<br>
1898
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETCELLPADDING">GTextTable::SetCellPadding</a>, <a href="GTextTable.html#_GTEXTTABLE_SETPADDING">GTextTable::SetPadding</a> and <a href="GTextTable.html#_GTEXTTABLE_SETCOLPADDING">GTextTable::SetColPadding</a>
1899
 
1900
$table-&gt;SetRowPadding(4,12);</font>
1901
 
1902
<p>
1903
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_SETSCALEPOS"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1904
function&nbsp;SetScalePos($aX,$aY)</font>
1905
</b></div></a></span>
1906
 
1907
<span style='font-family:arial;font-size:90%;'><i>Set position of the entire table on the graphn using the current X,Y sclae</i></span><p>
1908
 
1909
<table cellspacing=0 style='border:black solid 1pt;' width=100%>
1910
<tr><th width=25%>Argument</th><th width=15%>Default</th><th width=60%>Description</th></tr>
1911
 
1912
$aX</font>
1913
 
1914
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>X-position according to current scle</td></tr>
1915
1916
 
1917
$aY</font>
1918
1919
</td><td style='border-right:black solid 1pt;font-family:courier;font-size:90%;font-weight:bold;'>&nbsp;</td><td>Y position according to curent scale</td></tr>
1920
 
1921
1922
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>This method makes it possible to place the table at specific scale coordinates within the plot area of the graph. This could for example be used to place a small table at each of the data points in a line graph (or some other type of plot) to show fyrther details.
1923
 
1924
Note: The anchor position of the table can also be adjusted by the method SetAnchorPos(). By deagule the top left corner of the table is aligned with the specified coordinates.&nbsp;<br>
1925
<br>
1926
<div style="font-weight:bold;font-family:arial;font-size:85%;">Returns</div>VOID<br>
1927
 &nbsp; <div style="font-weight:bold;font-family:arial;font-size:85%;">See also</div><a href="GTextTable.html#_GTEXTTABLE_SETPOS">GTextTable::SetPos</a> and <a href="GTextTable.html#_GTEXTTABLE_SETANCHORPOS">GTextTable::SetAnchorPos</a>
1928
 
1929
//&nbsp;Create&nbsp;the&nbsp;tables&nbsp;and&nbsp;position&nbsp;them&nbsp;at&nbsp;each&nbsp;data&nbsp;point
<br />//&nbsp;In&nbsp;the&nbsp;line&nbsp;plot
<br />//&nbsp;The&nbsp;data&nbsp;for&nbsp;each&nbsp;table&nbsp;is&nbsp;held&nbsp;in&nbsp;$tabledata[]&nbsp;array
<br />//&nbsp;and&nbsp;the&nbsp;plot&nbsp;data&nbsp;is&nbsp;available&nbsp;in&nbsp;$datay[]&nbsp;array.
<br />
<br />$n&nbsp;=&nbsp;count($datay);
<br />$table=array();
<br />for($i=0;&nbsp;$i&nbsp;&lt;&nbsp;$n;&nbsp;++$i&nbsp;)&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;$table[$i]&nbsp;=&nbsp;new&nbsp;GTextTable();
<br />&nbsp;&nbsp;&nbsp;&nbsp;$table[$i]-&gt;Set($tabledata[$i]);
<br />&nbsp;&nbsp;&nbsp;&nbsp;$table[$i]-&gt;SetScalePos($i,$datay[$i]);
<br />&nbsp;&nbsp;&nbsp;&nbsp;$table[$i]-&gt;SetFillColor('lightyellow@0.5');
<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;We&nbsp;center&nbsp;all&nbsp;tables&nbsp;on&nbsp;the&nbsp;data&nbsp;point
<br />&nbsp;&nbsp;&nbsp;&nbsp;$table[$i]-&gt;SetAnchorPos('center','middle');
<br />&nbsp;&nbsp;&nbsp;&nbsp;$graph-&gt;Add($table[$i]);
<br />}
<br />...
<br />//&nbsp;Create&nbsp;the&nbsp;line
<br />$l1&nbsp;=&nbsp;new&nbsp;LinePlot($datay);
<br />$l1-&gt;SetWeight(2);
<br />$graph-&gt;Add($l1);
<br />...</font>
1930
</span><br>
1931
<p>
1932
<p>&nbsp; <p> &nbsp; <span style='font-size:110%;'><a name="_GTEXTTABLE_TOSTRING"><div style="border-top:solid black 2pt;background-color:lightblue;font-family:courier new;font-size:90%;font-weight:bold;"><b><font color="#000000">
1933
function&nbsp;toString()</font>
1934
</b></div></a></span>
1935
1936
<span style='font-family:arial;font-size:90%;'><i>Return basic HTML version of the table</i></span><p>
1937
<br>
1938
1939
<div style="font-weight:bold;font-family:arial;font-size:85%;">Description</div>Return basic HTML version of the table. Note that this is just a very basic representation of the table without any of the formatting applied the table.&nbsp;<br>
1940
1941
 
1942
$str&nbsp;=&nbsp;$table-&gt;toString();</font>
1943
 
1944
<p> <hr> <p>