Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. New problem :) Positioning ComboBox

New problem :) Positioning ComboBox

Scheduled Pinned Locked Moved Visual Basic
csharphelpquestion
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    FeRtoll
    wrote on last edited by
    #1

    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

    P 1 Reply Last reply
    0
    • F FeRtoll

      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

      P Offline
      P Offline
      PremalathaP
      wrote on last edited by
      #2

      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

      F 1 Reply Last reply
      0
      • P PremalathaP

        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

        F Offline
        F Offline
        FeRtoll
        wrote on last edited by
        #3

        have u smokeing something?:rolleyes::rolleyes::rolleyes::rolleyes: FeRtoll Software.net ------------ E-Mail me WebPage

        D 1 Reply Last reply
        0
        • F FeRtoll

          have u smokeing something?:rolleyes::rolleyes::rolleyes::rolleyes: FeRtoll Software.net ------------ E-Mail me WebPage

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          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 and Top properties, or both at once using its Location property. If the ComboBox is behind another control, you can bring it to the top by calling its BringToFront method. You might also have to set its Visible 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's Controls collection and wire up any events that you want to handle by hand, using AddHandler and RemoveHandler. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          F 1 Reply Last reply
          0
          • D Dave Kreskowiak

            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 and Top properties, or both at once using its Location property. If the ComboBox is behind another control, you can bring it to the top by calling its BringToFront method. You might also have to set its Visible 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's Controls collection and wire up any events that you want to handle by hand, using AddHandler and RemoveHandler. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

            F Offline
            F Offline
            FeRtoll
            wrote on last edited by
            #5

            omfg i am not noob... lol FeRtoll Software.net ------------ E-Mail me WebPage

            S D 2 Replies Last reply
            0
            • F FeRtoll

              omfg i am not noob... lol FeRtoll Software.net ------------ E-Mail me WebPage

              S Offline
              S Offline
              Steve Pullan
              wrote on last edited by
              #6

              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 :-)

              1 Reply Last reply
              0
              • F FeRtoll

                omfg i am not noob... lol FeRtoll Software.net ------------ E-Mail me WebPage

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                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

                F 1 Reply Last reply
                0
                • D Dave Kreskowiak

                  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

                  F Offline
                  F Offline
                  FeRtoll
                  wrote on last edited by
                  #8

                  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

                  D 1 Reply Last reply
                  0
                  • F FeRtoll

                    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

                    D Offline
                    D Offline
                    Dave Kreskowiak
                    wrote on last edited by
                    #9

                    Perhaps 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

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups