s_mccolgan
asked on
Move ListBox into RTF, 1 line under.
Fellow VB Programmers,
I am using the RichTextBox control and would like to know
how to move the a ListBox underneath the current line,
like in VB when you dim a value as, a ComboBox or ListBox appears.
For the sake of this question,
Please insert the RTF Control and a ListBox onto a form.
Let the Listbox.Visisble = False and insert the Following code
into your sample...
Private Sub RichTextBox1_KeyPress(KeyA scii As Integer)
Select Case Chr$(KeyAscii)
case "!"
List1.Visible = True
' And the Code to move it here...
case else
end select
end sub
When you press the ! key, it will show you the ListBox.
Now, in order to properly answer this Question,
have the ListBox popup right underneath your current position
in the RichTextBox control. Left & Top.
Thank you.
I am using the RichTextBox control and would like to know
how to move the a ListBox underneath the current line,
like in VB when you dim a value as, a ComboBox or ListBox appears.
For the sake of this question,
Please insert the RTF Control and a ListBox onto a form.
Let the Listbox.Visisble = False and insert the Following code
into your sample...
Private Sub RichTextBox1_KeyPress(KeyA
Select Case Chr$(KeyAscii)
case "!"
List1.Visible = True
' And the Code to move it here...
case else
end select
end sub
When you press the ! key, it will show you the ListBox.
Now, in order to properly answer this Question,
have the ListBox popup right underneath your current position
in the RichTextBox control. Left & Top.
Thank you.
Have you considered using the right-click context menu?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.