S
steve
Hi All
I have textboxes within a TableLayoutpanel and I want to be able to position
an independant control adjacent to a selected textbox
This independent control allows selection of text to insert into the textbox
I am having trouble achieving this, see code below, the x position is too
far to the right and the y position is close to the bottom of the textbox
and I want it to be side by side.
I am obviously not understanding the coordinate system properly
Regards
Steve
Private Sub txtbox_Mousedown(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs)
'common sub for any textbox clicked
Dim mypoint As New Point
Panel1.Visible = True
Panel1.BringToFront()
mypoint.X = sender.pointtoscreen(sender.location).x + sender.width
mypoint.Y = sender.pointtoscreen(sender.location).y
Panel1.Location = mypoint
end sub
I have textboxes within a TableLayoutpanel and I want to be able to position
an independant control adjacent to a selected textbox
This independent control allows selection of text to insert into the textbox
I am having trouble achieving this, see code below, the x position is too
far to the right and the y position is close to the bottom of the textbox
and I want it to be side by side.
I am obviously not understanding the coordinate system properly
Regards
Steve
Private Sub txtbox_Mousedown(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs)
'common sub for any textbox clicked
Dim mypoint As New Point
Panel1.Visible = True
Panel1.BringToFront()
mypoint.X = sender.pointtoscreen(sender.location).x + sender.width
mypoint.Y = sender.pointtoscreen(sender.location).y
Panel1.Location = mypoint
end sub