|
-
Nov 5th, 2000, 11:03 PM
#1
Thread Starter
PowerPoster
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
-
Nov 6th, 2000, 01:37 AM
#2
Frenzied Member
This is the only way I know how:
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
'Panels(1)' refers to the default panel. You can add more though.
-
Nov 6th, 2000, 02:08 AM
#3
Lively Member
control array
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
-
Nov 6th, 2000, 09:10 AM
#4
-
Nov 6th, 2000, 09:55 AM
#5
Fanatic Member
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
-
Nov 6th, 2000, 12:33 PM
#6
Thread Starter
PowerPoster
thanks
thanks for all the suggestions, i will try them in my program.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|