Tooltips & scollable tree
This commit is contained in:
parent
9f6bbb689b
commit
10eeb673e8
12
source/app.d
12
source/app.d
@ -17,7 +17,7 @@ import gtk.CellRendererText;
|
||||
import gtk.VBox;
|
||||
import gtk.Statusbar;
|
||||
import gtk.Button;
|
||||
|
||||
import gtk.ScrolledWindow;
|
||||
|
||||
import gtk.HBox;
|
||||
|
||||
@ -33,10 +33,15 @@ void main(string[] args)
|
||||
cont.setSizeRequest(0, 100);
|
||||
|
||||
auto buttonSave = new Button("document-save-symbolic", GtkIconSize.MENU);
|
||||
buttonSave.setTooltipText("Save");
|
||||
auto buttonOpen = new Button("document-open-symbolic", GtkIconSize.MENU);
|
||||
buttonOpen.setTooltipText("Open 2DA");
|
||||
auto buttonInsert = new Button("format-text-direction-ltr-symbolic", GtkIconSize.SMALL_TOOLBAR);
|
||||
buttonInsert.setTooltipText("Insert row after");
|
||||
auto buttonDelete = new Button("user-trash-symbolic", GtkIconSize.SMALL_TOOLBAR);
|
||||
buttonDelete.setTooltipText("Delete row");
|
||||
auto buttonRenumber = new Button("view-list-symbolic", GtkIconSize.SMALL_TOOLBAR);
|
||||
buttonRenumber.setTooltipText("Renumber all rows");
|
||||
|
||||
version(Windows){
|
||||
//Menu bar
|
||||
@ -69,8 +74,11 @@ void main(string[] args)
|
||||
statusbar.packStart(buttonDelete, false, false, 5);
|
||||
|
||||
//TreeView to display database
|
||||
auto scroll = new ScrolledWindow(PolicyType.AUTOMATIC, PolicyType.AUTOMATIC);
|
||||
cont.packEnd(scroll, true, true, 0);
|
||||
|
||||
auto tree = new TreeView();
|
||||
cont.packEnd(tree, true, true, 0);
|
||||
scroll.add(tree);
|
||||
|
||||
tree.setHeadersVisible(true);
|
||||
tree.setEnableSearch(true);
|
||||
|
Loading…
Reference in New Issue
Block a user