Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

A menu seperator in a combo box

Posted on 1999-07-05
11
Medium Priority
?
221 Views
Last Modified: 2013-12-25
I have about 3 different types of items under one category in a single combobox list.  Right now, I have them segrigated by a list item like: "--------------", but it's pretty ugly.  I've seen comboboxes with solid lines as list items in them, but I don't know how to do it.  If you don't know what I'm talking about, think of the seperator in a menu that you create with a single "-".  If someone could tell me the trick behind making that same line in a combo, I'd really appreciate it. Thanks for any feedback,

-Chris
0
Comment
Question by:core123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 4

Expert Comment

by:vindevogel
ID: 1494999
Simple question : tricky answer
0
 

Author Comment

by:core123
ID: 1495000
There, up to 70, you happy? :)
0
 
LVL 4

Expert Comment

by:vindevogel
ID: 1495001
I don't know the answer, sorry ... I did not say it for the points !

It's such a simple question, yet the answer is not easy and probably a workaround for something else.

Sorry, can't help you, really.

The only thing you can do is this

combo1.additem "____________________________________"

This adds a line, with just a little opening on the left side, completely filled on the right side.
Or you can add a blank line.

I know it's not quite as good as the menu seperator, but I don't see another way.

I won't post this as an answer.  If you're satisfied however and nobody turns up with a solution, I'll be glad to accepts the points however.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Expert Comment

by:poneill011098
ID: 1495002
There is a character in the arial font set (Alt-0151) which draws a line across the character spacing ——— see (if you have Windows you shold be able to see it).

Then just add a row of these instead of minus signs...

Regards
Paul

0
 
LVL 4

Expert Comment

by:vindevogel
ID: 1495003
poneil : yeah, but then you have to set the font of the combo to arial ...
0
 

Author Comment

by:core123
ID: 1495004
It's a good idea, but I've already tried that.  I think there is another way.  Maybe there isn't, we'll see.
0
 
LVL 1

Expert Comment

by:poneill011098
ID: 1495005
The only other possibility is that, like the menu, you specify a single minus sign, and the combo interprets it for you . . . .

Regards
Paul

0
 
LVL 4

Expert Comment

by:vindevogel
ID: 1495006
Sorry Paul ... won't work, have you even tried that ?  It works for menus but not for combos
0
 

Author Comment

by:core123
ID: 1495007
You might wanna try your answer before you submit it.  *Sigh*, already did that.  Aw well, guess there's no way, heh.
0
 
LVL 7

Accepted Solution

by:
Vbmaster earned 5240 total points
ID: 1495008
Check out the owner-drawn combo box at

http://www.vbaccelerator.com

There's FULL source code for such a .OCX file, you can use the compiled version or (if you are just like me and many others and don't like .OCX's) just copy the code into your project. ;)
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6821740
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects that and the expert will now receive these points, all verified.

Please click on your Member Profile, select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.
 
Thanks,
Moondancer
Moderator @ Experts Exchange
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question