[RESOLVED] Stupid Baloons $#@!!!
I think I'm going to kill somebody because of this. The same code, the same window position, everything is the same, one time it is displayed correctly, but another time it's upside down (7 hours are wasted so far):
Here's the code:
vb.net Code:
' Tips is Windows.Forms.ToolTip component.
Try
Matches = Regex.Matches(InputBuffer, pattern)
Catch ex As ArgumentException
rtbRegex.BackColor = Color.Pink
rtbRegex.Select()
With Tips
.IsBalloon = True
.ToolTipTitle = "Error"
.ToolTipIcon = ToolTipIcon.Error
.UseAnimation = True
.UseFading = True
.Show("The regular expression is invalid.", rtbRegex, 3000)
End With
Exit Sub
End Try
And here's what I get (I repeat - I didn't change anything, just typed in a ( then deleted and typed it again:
http://i48.tinypic.com/2v2w8ap.jpg
Does anybody know how to make it behave correctly?
Does anybody
Re: Stupid Baloons $#@!!!
Handle the 4th argument
Code:
.Show("The regular expression is invalid.", rtbRegex, 0,0,3000)
where the 0,0 is the relative position
MSDN
Re: Stupid Baloons $#@!!!
I tested the x and y co-ord with similar results. In my case it starts of in the wrong spot, then next time round it's ok providing I get it to re-display while its on.
Re: Stupid Baloons $#@!!!
It appears that the top left corner of the TT is the anchor/reference point for it's display, not nesseserly the tip.
Re: Stupid Baloons $#@!!!
Quote:
Originally Posted by
Bruce Fox
It appears that the top left corner of the TT is the anchor/reference point for it's display, not nesseserly the tip.
I agree. Only the top tip is relative. Not the Ball on
Re: Stupid Baloons $#@!!!
I gave up and dropped the idea, now it's a normal rectangle tooltip. I tried it with every overload that is available for the .Show method - it always displays incorrectly for the first time. It seemed logical to me to provide the property for the anchor point I want it point to and the properties for the rectangle itself. This 'automatic' mode seems to have some stupid bug.
Re: Stupid Baloons $#@!!!
This one worked well for me
Code:
With ToolTip1
.IsBalloon = True
.UseAnimation = True
.UseFading = True
.ShowAlways = False
.SetToolTip(TextBox1, "Test")
.Show("Seocnd", TextBox1, TextBox1.Width - 4, 0)
End With
Re: Stupid Baloons $#@!!!
Finally. Thanks, if only you appeared earlier :)