This may be a cheesy question, but how do I enable all my controls tool tips to appear in my status bar?? I thought all i had to do was change a few properties, but it's not working..thanks
Printable View
This may be a cheesy question, but how do I enable all my controls tool tips to appear in my status bar?? I thought all i had to do was change a few properties, but it's not working..thanks
This is the only way I know how:
'Panels(1)' refers to the default panel. You can add more though.Code:Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(1) = Command1.ToolTipText
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(1) = ""
End Sub
put as many controls as you can into arrays to shorten the code wey97 gave you.
Code:Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(1) = Command1.ToolTipText
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(1) = ""
End Sub
Private Sub Text1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(1).Text = Text1(Index).ToolTipText
End Sub
:rolleyes:
I don't bake your cake and eat it for you too kokopeli.
:rolleyes:
I was sitting here thinking (and doing some tests) ... If you set up Timer or find a way to check when your mouse pointer is over a control make the status bar equal the tooltiptext of the control.
Now, if you do a search for "mousemove api" (without the quotes) here on VB-World, you'll find a nifty piece of code that will allow you to make the font of a label bold or normal if the mouse pointer is over it.
I modified this a bit to iterate through controls on the form and display the tooltiptext on the statusbar. I ran into some problems: The statusbar would continually update and create a flicker effect. Otherwise it worked fine.
If anyone else can help out and modify that code to allow for this function to work, that'd be snifty.
It basically uses the api to check where the mousepointer is on the form. It utilizes a timer to constantly check against the controls on the form. The timer checks to see where the mouse pointer is in relation to each control in form1.controls, if it falls in the specs for a control, and the control has a tooltip, then it will display it, otherwise, it displays nothing.
Hope this gives you ideas to get you going in the right direction, without having to code the mousemove of every control that is :)
thanks for all the suggestions, i will try them in my program.