Menu Event on the "TAB" top ? Only click works ?
Posted
#1
(In Topic #1298)
Regular

It seems that only CLICK event works there and I didn't find access to mouse button on click event .
If there is a Menu Event for STRIPTAB, we expect it works also on the part of the tab where the text is, as the CLICK event works there.
Anyone knows how to solve it?
Thanks
Posted
Guru

Code (gambas)
- .Arrangement = Arrange.Vertical
- .H = 512
- .W = 512
- .Padding = 5
- SetUpMenu
- .Count = 5
- .PopupMenu = "MyMenu"
- hMenu.Text = "&Main menu"
- hMenuItem.text = "&" & sTemp
- hMenuItem.name = sTemp
Posted
Guru

The tabs part of tabpanel/tabstrip are not that accessible only the panel contents
but the hidden method _GetButton() gets a particular TabPanelButton button object comp/src/gb.form/.src/TabPanel/_TabPanelButton.class · master · Gambas / gambas · GitLab
you can set various properties and also create an Observer to watch the button for events…
Something like this…
Code (gambas)
- ' make an Observer using the name TabBut, the TabBut_xxx events will fire "before" the tab uses them itself, you can cancel it's default usage with "Stop Event"
- ' A handy trick to set individual Tooltip for each tab button..
- TabPanel1._GetButton(0).Tooltip = "My custom panel button tooltip"
- hAlternativeMenu.Popup()
1 guest and 0 members have just viewed this.


