pan_setdigits(PANEL*, var num, var x, var y, STRING* format, FONT* font, var factor, var* pv)

pan_setstring(PANEL*, var num, var x, var y, FONT* font, STRING* str)

Adds or modifies a digits element on a panel. LC


PANEL* Panel pointer.
num Number of an existing digits element (1 = first digits of the panel) or 0 for adding a new digits element to the panel.
x, y, ... Parameters similar to the digits element, but with the parameter types given above.
str STRING* pointer, for displaying a text string instead of a variable.


Number of the element, or 0 if the element could not be found or created.


function main()
PANEL* my_panel = pan_create(NULL,0); FONT* my_font = font_create("Arial#40");
pan_setdigits(my_panel,0,300,200,"%2.f",my_font,1,sys_seconds); pan_setstring(my_panel,0,300,300,my_font,str_create("Test!")); set(my_panel,SHOW);

See also:

PANEL, digits, pan_setbutton, pan_setslider, pan_setwindow, pan_setpos, pan_setcolor

► latest version online