hello
how can i make a tooltiptext in a enabled textbox
i use if txt.enabled = true then txt.tooltiptext = "message" and not working
help me please
farizza
Printable View
hello
how can i make a tooltiptext in a enabled textbox
i use if txt.enabled = true then txt.tooltiptext = "message" and not working
help me please
farizza
Code:'create multil line tag tips...same use as tool tips except
'that with tool tips you are restricted to one line..
'with tag tips you get multiline
'remember to set the height and width of your
'label to fit your message
'
'this example uses a command button (command1) & a label (label1)
'
'on mouse over the command button the tool tag is displayed
'
Private Sub Form_Load()
Label1.BackStyle = 0 'or 1 and set the backcolor to tooltip color
Label1.Visible = False
End Sub
Private Sub Command1_MouseMove(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
Dim msg$
msg$ = "Tag tips for the beginner." & vbCrLf
msg$ = msg$ & "Multil Line Tag Tips Made Easy" & vbCrLf
msg$ = msg$ & "Think of the possibilities!"
Command1.Tag = msg$
Label1.Caption = Command1.Tag
Label1.Top = Command1.Top + Command1.Height
Label1.Left = Command1.Left + Command1.Width / 2
Label1.Visible = True
End Sub
Private Sub Label1_MouseMove(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
Label1.Visible = False
End Sub
'
'add the code from this event to any other control in the vivinity of
'the button as you want the lable to disappear when off the button
Private Sub Form_MouseMove(Button As Integer, _
Shift As Integer, X As Single, Y As Single)
Label1.Visible = False
End Sub
It should work fine with the code that you are having.Only thing is placing the code at the right position.Where you kept that code.Place it in txt_MouseMove event and it will work.
Try it and then give feedback