Home > Software engineering >  How to put the tabs in the combo?
How to put the tabs in the combo?

Time:09-22

I put the tabs in the combo, the code is as follows:
Combostr=sheng & amp; CRH (9) & amp; Shi & amp; CRH (9) & amp; The name
Combo1. AddItem combostr
For string separated, according to the desired effect is like this:
Henan puyang
Henan puyang the
Zhumadian, henan pingyu

But the actual effect is like this:

Only in combo1. A TAB, in the text the drop-down box: no, how do I can make a drop-down box there are tabs?

CodePudding user response:

Bad to do, or did you fill the blank space

CodePudding user response:

reference 1st floor bakw response:
bad to do, or fill blanks yourself


That it's bad to did,,,

CodePudding user response:

To many, it's a pity that you is accused of appearance, so not good solution,

CodePudding user response:

Simple point, such as need not TAB, change the horizontal line or
Henan - puyang
Henan puyang - the
Henan zhumadian - pingyu
Want to see clearly, sandwiched two Spaces in
Henan - puyang
Henan puyang - the
Henan zhumadian - pingyu
You want the effect of alignment, calculates the maximum count in each column of the column, according to the calculation of the space,,,
Again a little bit easier, simply use three combo, placename linkage line, to watch a lot of online, a little change can use inside,
At worst, combo control yourself, can use dropdown picturebox to draw effect, instead, it is more something,

CodePudding user response:

With the TAB character is in itself a wrong design!
For example, if you try chahar right wing HouQi XXX village in Inner Mongolia

CodePudding user response:

Inner Mongolia dahl Abraham mau MEDALS union flag

CodePudding user response:

I tried it on, this should be able to:
Sheng="henan"
Shi="puyang"
Name1="the"
Combo1. AddItem "henan" & amp; Space (3) & amp; "Zhumadian" & amp; Space (3) & amp; "Pingyu
"Combo1. AddItem sheng & amp; Space (3) & amp; Shi & amp; Space (3) & amp; Name1

Space (x) is put Spaces in the string, x is the number of Spaces, you can try,

CodePudding user response:

With the ComboBox and spell a ListBox,
Close to put a ListBox along under the ComboBox:
 
Private Sub Combo1_DropDown ()
List1. Visible=True
List1. SetFocus
End Sub

Private Sub Form_Load ()
Combo1. AddItem "henan" & amp; VbTab & amp; "Puyang" & amp; VbTab & amp; "
"List1. AddItem "henan" & amp; VbTab & amp; "Puyang" & amp; VbTab & amp; "
"
Combo1. AddItem "henan" & amp; VbTab & amp; "Puyang" & amp; VbTab & amp; "The"
List1. AddItem "henan" & amp; VbTab & amp; "Puyang" & amp; VbTab & amp; "The"

Combo1. AddItem "henan" & amp; VbTab & amp; "Zhumadian" & amp; VbTab & amp; "Pingyu
"List1. AddItem "henan" & amp; VbTab & amp; "Zhumadian" & amp; VbTab & amp; "Pingyu
"
List1. Height=List1. ListCount * 240
List1. ListIndex=0
List1. Visible=False
End Sub

Private Sub List1_Click ()
Combo1. ListIndex=List1. ListIndex
List1. Visible=False
End Sub

CodePudding user response:

You can add:
 Private Sub Form_Click () 
List1. Visible=False
End Sub
when the mouse to click the form other place, can give up the List items, click on the List are

CodePudding user response:

Well, by a space
  • Related