pvbrowser manual
Back Content Forward

визуален обект таблица

Тези функции може да се приложат към таблицате (tableWidgets):

Функции на визуалния обект таблица

Например може да напишете следното:

pvSetColumnWidth(p,Table1,1,100);                              // set column 1 width
pvSetColumnWidth(p,Table1,2,100);                              // set column 2 width
pvTablePrintf(p,Table1,0,0,"color(255,0,0)%5.2f",fval);        // output text in red
pvTablePrintf(p,Table1,0,3,"%5.2f",fval);                      // output text without color
pvSetTablePixmap(p,Table1,1,0,"error.bmp");                    // insert a pixmap
pvSetTablePixmap(p,Table1,1,1,"ok.bmp");                       // insert a pixmap
pvSetTableCheckBox(p,Table1,2,0,1,"CheckBox");                 // insert a check box
pvSetTableComboBox(p,Table1,2,1,1,"choice1,choice2,choice3");  // insert a combo box with 3 choices
pvTablePrintf(p,Table1,0,-1,"hello");                          // set title of a column
pvTablePrintf(p,Table1,-1,0,"world");                          // set title of a row
pvSetColumnWidth(p,Table1,-1,40);                              // set width of a row title
pvSetTableText(p,Table1,x,y,"text");                           // set text of a table cell
pvEnsureCellVisible(p,Table1,row,col);                         // Scroll table so that cell is visible
pvSetNumRows(p,Table1,num);                                    // Set number of rows
pvSetNumCols(p,Table1,num);                                    // Set number of colums
pvCSVdump(p,Table1, "filename.csv");                           // populate table using a CSV file
pvMysqldump(p,Table1,"--where=cat='1' -t database table");     // populate table using mysqldump

Back Content Forward