How do I set the Mh3dCombo Textcolor property and keep the individual color of the text on each line?

I have a problem with the Mh3dCombo box. I set the Textcolor property and then add the item, for each one
so,
cboTemp.TextColor = QBColor(9)
cboTemp.AddItem "Blue"
cboTemp.TextColor = QBColor(4)
cboTemp.AddItem "Red"
cboTemp.TextColor = QBColor(0)
cboTemp.AddItem "Black"

It all looks well when I drop down the combo box, but when i hover the mouse up or down, all items get re-painted to the last colour i used when adding the items, in this case Black.

Any ideas how to keep the colour as was at add time? maybe an API?
tiseffiesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GrahamSkanRetiredCommented:

Use the ListTextColor property. This applies to individual entries. The TextColor propert applies to the whole control. These are extracts from the Help File

************************
The TextColor property sets or returns the color used to draw all text displayed in the control. Three colors are used when creating the 3-D effect for the control border and text: LightColor, ShadowColor, and TextColor.

Syntax
[form!]Mh3dCombo.TextColor[ = colorref& ]

Data Type
Color

Default Value
Black

***********************************

The ListTextColor property sets or returns the color used for the text in the specified line.

Syntax
[form!]Mh3dCombo.ListTextColor(index As Integer)[ = colorref& ]

Remarks
The parameters for the ListTextColor property are described below:

index%


Data Type
Color
0
tiseffiesAuthor Commented:
This property behaves the same way for me as textcolor, except that when i hover up/down with the mouse on the combo it changes the colour to black! Here is  a snippet. Am I missing something?

Dim i%

do until rs001.eof
  cboTemp.AddItem rs001!field
  Select case rs001!field
    "Blue"
       cboTemp.ListTextColor(i) = QBColor(9)
     "Red"
       cboTemp.ListTextColor(i) = QBColor(4)
     "Black"
       cboTemp.ListTextColor(i) = QBColor(0)
  End Select
  rs001.MoveNext
  i=i+1
loop

I also tried setting the listtextcolor after the loop one at a time, after been added, same problem!
Thanks
0
tiseffiesAuthor Commented:
Here is an interesting observation I made whilst testing this out. The style of my mh3dcombo is 2 - mhDropDownListCombo. When I change the style to 1 - MhDropDownCombo it works! But that is not a suitable style for me.
Any ideas?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

GrahamSkanRetiredCommented:
I don't think it's a colour thing.
This works OK for me.

Mh3dCombo1.AddItem "abc"
Mh3dCombo1.AddItem "def"
Mh3dCombo1.AddItem "ghi"
Mh3dCombo1.ListTextColor(0) = vbBlue
Mh3dCombo1.ListTextColor(1) = QBColor(4)
Mh3dCombo1.ListTextColor(2) = vbBlack
0
GrahamSkanRetiredCommented:
Sorry, didn't refresh.
I'm using style 2. Can't use 1 anyway, probably because I don't have a license. I only downloaded it to see what the problem was.
0
tiseffiesAuthor Commented:
I tried your simple example in a new project. I still have the problem. Maybe I'm not explaining myself properly.
Click the arrow to drop down the combo, then move the mouse pretending you'll select something, so move the mouse over the drop down list, the color changes.
Also my version of the control is. MHCMBO32.OCX 5.1.0.20.
I can't think of anything else to try.
0
tiseffiesAuthor Commented:
I found a workaround. I noticed that once I picked an item from the combo the problem goes away. That is if i drop the combo box down again, the colours are in place on the items.
So, If I add a blank item at the start of the combo and set the index to it, it won't change the colour of the items in the list, and the user still has to select an item like before. Not much of a change. I think i will go with that unless someone has a better idea (and can get my problem on his/her machine!)

Thanks
0
GrahamSkanRetiredCommented:
On my system, when the mouse cursor is over an item, the background color is black and the text changes to white, but the original colours are restored after the mouse pointer has moved away.

The good news is that my version is 7.0.0.33, so it's probably a fixed problem and you could update. Hopefully your license will still work, otherwise it's 149 dollars.

Home page:
http://www.becubed.com/Merchant2/merchant.mv?Screen=SFNT&Store_Code=B

Product page:
http://www.becubed.com/Merchant2/merchant.mv?Screen=PROD&Store_Code=B&Product_Code=031470
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tiseffiesAuthor Commented:
ok
i only had ole 7 sp10 to test with and that still gave me the problem, so i downloaded ole7 sp18 and that fixes the bug.
obviously there is not other workaround as it is a control bug/limitation so i will consider upgrading the control in my app.
thanks for your help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.