|
-
Jul 23rd, 2008, 05:53 AM
#1
Thread Starter
Lively Member
[RESOLVED] Text colours in combobox
Is there any way of setting (at design time) different colours for individual items in a combobox? I want to have certain items permenantly shown in a different colour to emphasise key options. A bold option would be OK also.
e.g.
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
or
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Thanks,
Steve
Old divers never die, they just go down on old wrecks 
-
Jul 23rd, 2008, 05:55 AM
#2
Re: Text colours in combobox
Not with the standard VB combo box. You would need to find a third party combo control for this.
-
Jul 23rd, 2008, 06:03 AM
#3
Thread Starter
Lively Member
-
Jul 23rd, 2008, 06:06 AM
#4
-
Jul 23rd, 2008, 06:08 AM
#5
Re: Text colours in combobox
-
Jul 23rd, 2008, 06:13 AM
#6
Thread Starter
Lively Member
Re: Text colours in combobox
Cheers guys, thanks for your help.
Steve
Old divers never die, they just go down on old wrecks 
-
Jul 23rd, 2008, 06:18 AM
#7
Re: Text colours in combobox
I found this. See the "CustomDraw LV Demo.zip" Does it help?
-
Jul 23rd, 2008, 07:35 AM
#8
Thread Starter
Lively Member
Re: Text colours in combobox
 Originally Posted by Hack
I found this. See the "CustomDraw LV Demo.zip" Does it help?
This is certainly what I was after. The only downside is that it requires a DLL installing on the users machine, whereas I would prefer to create a stand alone program that doesn't need to be installed.
This is of interest though and I will have a play, I am sure this can be of good use.
Thanks
Steve
Old divers never die, they just go down on old wrecks 
-
Jul 23rd, 2008, 07:40 AM
#9
Re: Text colours in combobox
If you want a program that doesn't need installation, don't use VB - even the most basic VB program requires certain files to be installed (which might be installed on your target computers already, but might not!).
For more info, see the article Why doesn't my program work on another computer? from our Classic VB FAQs (in the FAQ forum, which is shown near the top of our home page)
-
Jul 23rd, 2008, 07:54 AM
#10
Thread Starter
Lively Member
Re: Text colours in combobox
I create small utility programs, some are very basic. None require any installation and VB suits me fine.
See some examples here: Diving utilities
Steve
Old divers never die, they just go down on old wrecks 
-
Jul 23rd, 2008, 08:05 AM
#11
Re: Text colours in combobox
As explained in my previous post and the link I provided, all VB programs require some level of installation, as they all have dependencies - you have just been lucky (so far) that somebody else has already installed the components that are needed by your programs.
That will not always be the case.
-
Jul 23rd, 2008, 08:08 AM
#12
Re: Text colours in combobox
 Originally Posted by si_the_geek
That will not always be the case.
And a point in case will be whatever control you decide to go with in terms of the combo box control that supports multi colored lines. That will require a formal installation and registration on each machine running the program.
-
Jul 23rd, 2008, 08:13 AM
#13
Thread Starter
Lively Member
Re: Text colours in combobox
The programs I have written will all work with standard Windows installations, probably would work with basic Win98 install.
Cheers all.
Steve
Old divers never die, they just go down on old wrecks 
-
Jul 23rd, 2008, 08:39 AM
#14
Re: Text colours in combobox
That may be the case for certain editions of Win98SE but not the standard Win98, as it was released before VB6, and so does not include even the basic runtime package (even some editions of Win2000 don't).
Even when the runtime package is installed, it could well be an old version (only Vista includes an up to date one!), and thus include many bugs - there have been hundreds of issues corrected over the years.
Whether you are willing to admit it or not, so far you have just been lucky that somehow a version of the runtime has been installed before your program has been run (either as part of the Windows installation, or by a more knowledgeable programmer), and it does not have obvious bugs for your program.
There are good reasons for the vast majority of programs for Windows requiring an installation - it isn't just done for show.
-
Jul 23rd, 2008, 08:41 AM
#15
Re: Text colours in combobox
I agree with si here. VB still needs some libraries to run no mather what components app uses. A great examples is the main VB library (if you're using VB6):
Code:
...\SYSTEM32\msvbvm60.dll
. If you delete it no VB app will work. As said, you're lucky all users had it on their Windows.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|