Saturday, 24 July 2021

Treeview 04

The script shows how to create a two-column list in a GTK3 window. Based on the operations defined in Treeview 02 previously, two more operations which can move the items up and down are added to the treeview.



  1. Define an entry box.
  2. Define a treeview list with two columns.
  3. The width of the column can be resize.
  4. The sorting order of items in each column can be changed by clicking on the column labels.
  5. Define font style for the texts in the columns.
  6. Define right alignment for the numeric column.
  7. Use Ctrl-f to find row quickly when treeview is set focused.
  8. Define some action buttons: Edit, Del and Clear, which can modify the items in the list.
  9. Define two more action buttons: Up and Down, which can move the items in the list.
  10. Use stock icon and tooltip to construct each buttons.
  11. Define a status bar at the bottom of the window. The bar can show message given by the operations performed.


Source Code


No comments:

Post a Comment