New topic: 

Yellow background color for a combobox?

<http://forums.realsoftware.com/viewtopic.php?t=29183>

       Page 1 of 1
   [ 5 posts ]                 Previous topic | Next topic         Author  
Message       Jonathon           Post subject: Yellow background color for a 
combobox?Posted: Wed Jul 22, 2009 7:53 pm                               
Joined: Fri Sep 30, 2005 5:54 pm
Posts: 1723
Location: Great Falls, Montana  USA              Ok another dang problem.

I had an enditfiled withthe background color set to yellow indicating a 
required field.  Ok not a problem, but then I decided to change the editfiled 
to a combobox as I wanted the user to have a selection of tag names.  Well, I 
just noticed that my tag name entry has no yellow background color anymore.  
And after looking, there is no option for a background color either.

So, the question is...
1> Is there a work-a-round to have a yellow background color for a combobox?
2> If not, then should I put it back to an editfiled and then have a popup menu 
come up instead?
3> Or... Say screw it as no ones going to use the program anyway? 

Sorry 3 is NOT an option, as I worked to hard on this to give up now!

Any help please!     
_________________
Jonathon
Software Devlopement: http://www.medalertpc.com
Surplus Hardware: http://www.semielectronics.com

RB2005 R4 Pro for Windows XP Pro/SP2  
                            Top                Aaron Ballman           Post 
subject: Re: Yellow background color for a combobox?Posted: Wed Jul 22, 2009 
9:17 pm                               
Joined: Wed Sep 28, 2005 8:39 am
Posts: 9275
Location: St Augusta, MN              Jonathon wrote:1> Is there a work-a-round 
to have a yellow background color for a combobox?

That depends on your platform, but if it's Windows, then certainly.  The 
ComboBox can be subclassed (in the Win32 sense, not the RB sense) and you can 
respond to the OS messages requesting background color brushes.  I've not tried 
it yet, but I don't imagine it being too hard.

Quote:2> If not, then should I put it back to an editfiled and then have a 
popup menu come up instead?

That's a bad idea as it won't behave terribly well with accessibility features 
and user expectations.     
_________________
* Check out my blog at http://ramblings.aaronballman.com. 
* RBLibrary.com  REALbasic learning at the speed of now! 
* Get the WFS, everybody's using it.  
                            Top                computerfreaker           Post 
subject: Re: Yellow background color for a combobox?Posted: Wed Jul 22, 2009 
9:27 pm                               
Joined: Thu Mar 05, 2009 1:03 pm
Posts: 1123
Location: USA              Or (devious idea)...  
why not just paint it yourself in the Paint event? It shouldn't be too hard to 
do...     
_________________
Learn something new every day, and the rest will take care of itself.

Life is a journey, not a destination. Enjoy the trip!   
                            Top                timhare           Post subject: 
Re: Yellow background color for a combobox?Posted: Wed Jul 22, 2009 9:42 pm     
                   
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 5900
Location: Portland, OR  USA              What paint event?  The window Paint 
event is too early.  Combobox doesn't have a paint event.   
                            Top               Jonathon           Post subject: 
Re: Yellow background color for a combobox?Posted: Wed Jul 22, 2009 10:26 pm    
                           
Joined: Fri Sep 30, 2005 5:54 pm
Posts: 1723
Location: Great Falls, Montana  USA              Ok here's what I did.... 
Another Work-A-Round!

But it works so cool! 
Tag_1.text = Editfield, Background Color = Yellow
Tag_Select.text = ComboBox, TextChanged = Tag_1.text = Me.text

Tag_2.text = Editfield, Background Color = White

Thanks guys for replying at least!     
_________________
Jonathon
Software Devlopement: http://www.medalertpc.com
Surplus Hardware: http://www.semielectronics.com

RB2005 R4 Pro for Windows XP Pro/SP2  
                            Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 5 posts ]     
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to