how to use tabs in Comboboxes 
Author Message
 how to use tabs in Comboboxes

Hi,

I have looked everywhere and asked different Guru's. Till now the
problem is still unsolved:

I want to use a Combobox with multiple (2) columns:
(1) Code of 3 positions
(2) Description of 30 Positions

How to get the second column aligend properly?

Btw.
- I DO want a propositionnal Fonttype like Times New Roman or Arial
- For LIST-Boxes there is an API available to get the work done. But
this API does not work for COMBO-Boxes. I cannot imagine this can be a
too difficult problem. (for example, in MSAccess this is not a problem
at all)

Thank you very much.

Goan



Wed, 18 Jun 1902 08:00:00 GMT  
 how to use tabs in Comboboxes
You can't do it in a normal VB combo without making it owner-drawn, trapping
its creation by subclassing, and changing list window's the style bits
before its shown. The list portion, by default, is created without the
requisite LBS_USETABSTOPS style bit, a style that can;t be applied to the
control after the control has been created.

--
Randy Birch, MVP Visual Basic

http://www.mvps.org/vbnet/
http://www.mvps.org/ccrp/

Please correspond only using the newsgroups so all can benefit.

| Hi,
|
| I have looked everywhere and asked different Guru's. Till now the
| problem is still unsolved:
|
| I want to use a Combobox with multiple (2) columns:
| (1) Code of 3 positions
| (2) Description of 30 Positions
|
| How to get the second column aligend properly?
|
| Btw.
| - I DO want a propositionnal Fonttype like Times New Roman or Arial
| - For LIST-Boxes there is an API available to get the work done. But
| this API does not work for COMBO-Boxes. I cannot imagine this can be a
| too difficult problem. (for example, in MSAccess this is not a problem
| at all)
|
| Thank you very much.
|
| Goan



Wed, 18 Jun 1902 08:00:00 GMT  
 how to use tabs in Comboboxes
I should add that if you really need such functionality, and don't mind
coding to subclass, you can set up the subclassing to trap the combo
dropdown message, cancel the default behavior, and display either a regular
VB listbox or even a listview as the combo's dropdown portion. I saw code
for this about a year ago on the net somewhere... but I can't be more
specific.

--
Randy Birch, MVP Visual Basic

http://www.mvps.org/vbnet/
http://www.mvps.org/ccrp/

Please correspond only using the newsgroups so all can benefit.



Wed, 18 Jun 1902 08:00:00 GMT  
 how to use tabs in Comboboxes
Good luck !

--
Randy Birch, MVP Visual Basic

http://www.mvps.org/vbnet/
http://www.mvps.org/ccrp/

Please correspond only using the newsgroups so all can benefit.

| Thank you very much. That's an excellent idea!
|
| Goan
|
| > I should add that if you really need such functionality, and don't mind
| > coding to subclass, you can set up the subclassing to trap the combo
| > dropdown message, cancel the default behavior, and display either a
regular
| > VB listbox or even a listview as the combo's dropdown portion.



Wed, 18 Jun 1902 08:00:00 GMT  
 how to use tabs in Comboboxes
Thank you very much. That's an excellent idea!

Goan

Quote:
> I should add that if you really need such functionality, and don't mind
> coding to subclass, you can set up the subclassing to trap the combo
> dropdown message, cancel the default behavior, and display either a regular
> VB listbox or even a listview as the combo's dropdown portion.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Tabbing through comboboxes in Excel

2. inserting tabs into comboboxes

3. Tabs in ComboBoxes

4. Tabs in Comboboxes

5. Force Tab selection using Tab Strip

6. Tab order when using Tab control

7. TAB and Shift+TAB using API

8. Using Comboboxes - Help

9. Help Please!! comboboxes in Excel using ActX

10. Using Enum with Comboboxes

11. Using Tabs in report controls

12. Using Tab to go to the next cell

 

 
Powered by phpBB® Forum Software