Jump to content

Tips for Tab Item on a tab control


atc
 Share

Recommended Posts

I have a Tab control with several tabs on it. My aim is that a tip appears, describing the tab item which has focus when the mouse moves over the tab at the top of the item.

I create the tab control and add the tab items in a manner similar to the following.

$CMtabC=GUICtrlCreateTab ($T_Left,$T_Top, $T_Width, $T_Height)

$CMtab1=GUICtrlCreateTabitem ("ABC")

GUICtrlSetTip($CMtab1, "Tab 1 Text") ------ OR -----GUICtrlSetTip(-1, "Tab 1 Text")

I get no errors BUT neither of these work

I have no problems displaying tips for other controls

What an I missing?

Any help would be appreciated.

Link to comment
Share on other sites

DjDeep00,

Thanks,

I found that all too confusing/complex for my feeble brain. However, I came up with a workable solution using the following function.

CODE
Func TabItemTip($sTip, $iLeft, $iTop)

GUICtrlCreateButton (" ", $iLeft, $iTop, 32, 23)

GUICtrlSetImage(-1, "shell32.dll", 24, 0)

GUICtrlSetTip(-1, $sTip)

EndFunc

I then call this routine immediately after creating the Tab Item, ie. after GUICtrlCreateTabitem ("Tab Item Label")

$sTip contains the tip I want to display for that tab item

$iLeft & $iTop are given so as to position the output from the function in line with the right edge of the Tab Control and on the same line as the Tab Item Label.

Note the space (Chr(32) as the first argument for GUICtrlCreateButton, without this, the icon does not show.

What appears is a Button with the normal help icon ie. a blue circular image, with a white circle enclosing a question mark which is icon #24 in "shell32.dll"

When the mouse is placed over it the text supplied by $sTip is displayed.

Because the function is called immediately after creating the Tab Item, it is associated with that tab item.

I see this a valid workaround. However, I have logged a Feature Request for Tab Items to be implemented as target control for GUICtrlSetTip - See Ticket #582

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...