Move ListBox into RTF, 1 line under.
Posted on 1998-11-02
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(KeyAscii As Integer)
Select Case Chr$(KeyAscii)
List1.Visible = True
' And the Code to move it here...
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.