0% found this document useful (0 votes)
4 views2 pages

Dynamic Table Creation in Code

The document outlines a script for creating and managing a table in a graphical interface. It includes functions for positioning the table and filling it with data based on specified coordinates. The script also contains logic for updating the table's appearance based on certain conditions.

Uploaded by

arthurderohan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Dynamic Table Creation in Code

The document outlines a script for creating and managing a table in a graphical interface. It includes functions for positioning the table and filling it with data based on specified coordinates. The script also contains logic for updating the table's appearance based on certain conditions.

Uploaded by

arthurderohan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

// —— 8.

Table {
var table tab_PRZ = [Link](
position = position.top_center,
columns = 5,
rows = 12,
bgcolor = #151715,
frame_width = 1,
frame_color = [Link],
border_width = 1,
border_color = [Link])

f_tab(int _x, int _y) =>


[Link]([Link](row_0, row_1, row_2, row_3, row_4, row_5, row_6, row_7,
row_8, row_9, row_10, row_11), _y, _x)

f_fill_tab(_str_Y, _str_X) =>


_pos = table.position_top_center
if _str_Y == 'top'
if _str_X == 'left'
_pos := table.position_top_left
else if _str_X == 'center'
_pos := table.position_top_center
else if _str_X == 'right'
_pos := table.position_top_right
else if _str_Y == 'middle'
if _str_X == 'left'
_pos := table.position_middle_left
else if _str_X == 'center'
_pos := table.position_middle_center
else if _str_X == 'right'
_pos := table.position_middle_right
else if _str_Y == 'bottom'
if _str_X == 'left'
_pos := table.position_bottom_left
else if _str_X == 'center'
_pos := table.position_bottom_center
else if _str_X == 'right'
_pos := table.position_bottom_right
_pos

if i_b_table and animal_number > -1


[Link](tab_PRZ)
tab_PRZ := [Link](
position = f_fill_tab(i_s_Y, i_s_X),
columns = 5,
rows = 12,
bgcolor = #151715,
frame_width = 1,
frame_color = [Link],
border_width = 1,
border_color = [Link])
for y = 0 to 11
for x = 0 to 4
[Link](
table_id = tab_PRZ,
column = x,
row = y,
text = f_tab(x, y),
bgcolor = y == 0 ? [Link] : y == 5 ? [Link]([Link],
80) : y == 6 ? [Link](col_valid, 80) : [Link]([Link], 100),
text_color = y == 0 ? [Link] : y >= 9 ? y == 9 ? [Link] :
[Link] : [Link],
text_size = i_s_font)
// }

You might also like