gui: improvements for execute toolbar

This commit is contained in:
mappu 2024-06-15 12:57:35 +12:00
parent 5cd3f6c765
commit f4d2d2ec39

19
main.go
View File

@ -90,6 +90,7 @@ func (f *TMainForm) OnFormCreate(sender vcl.IObject) {
mnuQueryExecute.SetCaption("Execute")
mnuQueryExecute.SetShortCutFromString("F5")
mnuQueryExecute.SetOnClick(f.OnQueryExecute)
mnuQueryExecute.SetImageIndex(imgLightning)
mnuQuery.Add(mnuQueryExecute)
f.Menu = vcl.NewMainMenu(f)
@ -157,10 +158,20 @@ func (f *TMainForm) OnFormCreate(sender vcl.IObject) {
queryTab.SetCaption("Query")
queryTab.SetImageIndex(imgLightning)
queryExecBtn := vcl.NewButton(queryTab)
queryExecBtn.SetParent(queryTab)
queryButtonBar := vcl.NewToolBar(queryTab)
queryButtonBar.SetParent(queryTab)
queryButtonBar.SetAlign(types.AlTop)
queryButtonBar.BorderSpacing().SetLeft(MY_SPACING)
queryButtonBar.BorderSpacing().SetTop(MY_SPACING)
queryButtonBar.BorderSpacing().SetBottom(0)
queryButtonBar.BorderSpacing().SetRight(MY_SPACING)
queryButtonBar.SetImages(f.ImageList)
queryButtonBar.SetShowCaptions(true)
queryExecBtn := vcl.NewToolButton(queryButtonBar)
queryExecBtn.SetParent(queryButtonBar)
queryExecBtn.SetCaption("Execute")
queryExecBtn.SetAlign(types.AlTop)
// queryExecBtn.SetImageIndex(imgLightning)
queryExecBtn.SetOnClick(f.OnQueryExecute)
f.queryInput = vcl.NewMemo(queryTab)
@ -170,7 +181,7 @@ func (f *TMainForm) OnFormCreate(sender vcl.IObject) {
f.queryInput.SetTop(1)
f.queryInput.Font().SetName("monospace")
f.queryInput.BorderSpacing().SetLeft(MY_SPACING)
f.queryInput.BorderSpacing().SetTop(MY_SPACING)
f.queryInput.BorderSpacing().SetTop(0)
f.queryInput.BorderSpacing().SetRight(MY_SPACING)
vsplit := vcl.NewSplitter(queryTab)