diff options
| author | Jeff Carr <[email protected]> | 2021-10-05 02:00:32 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2021-10-05 02:00:32 -0500 |
| commit | d97801b41e6c4d702b3781383cf79fb7505d66d8 (patch) | |
| tree | 7c5b9c132e5147832ea6df8cfc475b7a95d27eb5 /structs.go | |
| parent | 10292371973f65fda2997eda41e911fc48f45414 (diff) | |
TAB: automatically set all tables to SetMargined(true)
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'structs.go')
| -rw-r--r-- | structs.go | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -120,6 +120,7 @@ func (s GuiBox) InitTab(title string) { tab.Append(title, InitBlankWindow()) tab.SetMargined(0, true) + // tab.SetMargined(1, true) s.Window.UiTab = tab } @@ -153,17 +154,25 @@ func (s GuiBox) AddTab2(title string, custom ui.Control) *ui.Tab { func (s GuiBox) AddBoxTab(title string) *GuiBox { uiTab := s.AddTab2(title, InitBlankWindow()) + tabSetMargined(uiTab) var box *GuiBox box = HardBox(s.Window, Xaxis, "jcarrAddBoxTab") box.Window.UiTab = uiTab - return box - + return box } func (s GuiBox) AddDemoTab(title string) { s.AddTab(title, makeWindowTemplate()) } +func tabSetMargined(tab *ui.Tab) { + c := tab.NumPages() + for i := 0; i < c; i++ { + log.Println("tabSetMargined() i =", i) + tab.SetMargined(i, true) + } +} + // Note: every mouse click is handled // as a 'Button' regardless of where // the user clicks it. You could probably |
