New problem :) Positioning ComboBox
-
When i type the "<" the combobox with items is visible buth it always on same position. Is there anny way to set it on position where i typet the "<" in text box? :-> FeRtoll Software.net ------------ E-Mail me WebPage
Code: Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 60 Then '60 is Ascii value of < Combo1.Visible = True Combo1.Left = 500 End If End Sub
-
Code: Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 60 Then '60 is Ascii value of < Combo1.Visible = True Combo1.Left = 500 End If End Sub
-
have u smokeing something?:rolleyes::rolleyes::rolleyes::rolleyes: FeRtoll Software.net ------------ E-Mail me WebPage
No, but apparently you have. The answer he gave you is a little sparse, but essentially correct. You can position the ComboBox anywhere on the form using its
Left
andTop
properties, or both at once using itsLocation
property. If the ComboBox is behind another control, you can bring it to the top by calling itsBringToFront
method. You might also have to set itsVisible
property to True you already have this ComboBox on the form and are hiding it. If not, you'll have to create the ComboBox dynamically, you can, but you also have to add it to the form'sControls
collection and wire up any events that you want to handle by hand, usingAddHandler
andRemoveHandler
. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome -
No, but apparently you have. The answer he gave you is a little sparse, but essentially correct. You can position the ComboBox anywhere on the form using its
Left
andTop
properties, or both at once using itsLocation
property. If the ComboBox is behind another control, you can bring it to the top by calling itsBringToFront
method. You might also have to set itsVisible
property to True you already have this ComboBox on the form and are hiding it. If not, you'll have to create the ComboBox dynamically, you can, but you also have to add it to the form'sControls
collection and wire up any events that you want to handle by hand, usingAddHandler
andRemoveHandler
. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome -
omfg i am not noob... lol FeRtoll Software.net ------------ E-Mail me WebPage
FeRtoll wrote:
omfg i am not noob... lol
Well you act like it. :sigh: ...Steve quod erat demonstrandum "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once :-)
-
omfg i am not noob... lol FeRtoll Software.net ------------ E-Mail me WebPage
Like Steve said, you're acting like one. On top of that, you're asking questions on the level of one too. Maybe if you included a bit more detail about exactly what you're having a problem with, you wouldn't get the "shotgun" answer that covers all the basics. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Like Steve said, you're acting like one. On top of that, you're asking questions on the level of one too. Maybe if you included a bit more detail about exactly what you're having a problem with, you wouldn't get the "shotgun" answer that covers all the basics. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Steve Sorry... The problem is that i am from croatia and its hard to me to explain it on english wery good... I am trying buth its not easy... Well... My problem is that i want that the listbox shows when i press key"<" buth i want that it shows on the possition where was i typing where was the cursor buth not the mouse cursor, typing cursor(IBeam). I did make it like this... When key "<" is pressed if
listbox1.visible=true then listbox1.visible=false elseif listbox1.visible=false then listbox1.visible=true
buth the problem is that it is allways on possition where i place it in design. i want that his possition is where i have typing... Like in dreamweaver when u typing tags... Did i explain it good now? :doh: FeRtoll Software.net ------------ E-Mail me WebPage -
Steve Sorry... The problem is that i am from croatia and its hard to me to explain it on english wery good... I am trying buth its not easy... Well... My problem is that i want that the listbox shows when i press key"<" buth i want that it shows on the possition where was i typing where was the cursor buth not the mouse cursor, typing cursor(IBeam). I did make it like this... When key "<" is pressed if
listbox1.visible=true then listbox1.visible=false elseif listbox1.visible=false then listbox1.visible=true
buth the problem is that it is allways on possition where i place it in design. i want that his possition is where i have typing... Like in dreamweaver when u typing tags... Did i explain it good now? :doh: FeRtoll Software.net ------------ E-Mail me WebPagePerhaps you should read the documentation on the RichTextBox more, RichTextBox.GetPositionFromCharIndex[^]. This will return the position of any character, relative to the top-left corner of the RTB window. You'll have to do a little math to get the position of where you should position your listbox relative to the top-left corner of the Form. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome