Normal Topic Combo Box help (Read 1025 times)
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Combo Box help
Dec 9th, 2011 at 5:28pm
Print Post Print Post  
When a Combo Box selection is made, the text is entered into the field on top of a dark background or highlight (sorry, don't know what the technical name for it is). I've told the customer to just simply tab out of the field which takes away the highlight, but he's not happy with that. Is there a way to eliminate the highlight so that after the selection is made, he just sees the text with his default back/fill?

Thank you
  
Back to top
IP Logged
 
Rick_R
Full Member
***
Offline



Posts: 243
Joined: Jan 29th, 2010
Re: Combo Box help
Reply #1 - Dec 9th, 2011 at 5:51pm
Print Post Print Post  
Look into On Element Change and ForceRedraw.  (There is something along the lines of On Element Immediate Change). There are also commands that let you set specific attributes of an individual element.
  
Back to top
 
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Combo Box help
Reply #2 - Dec 9th, 2011 at 5:57pm
Print Post Print Post  
'Highlight mode' can be turned on and off by simply pressing the 'Insert' key on the keyboard.
  
Back to top
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Combo Box help
Reply #3 - Dec 9th, 2011 at 6:21pm
Print Post Print Post  
Thanks for the replies Rick & Steve,

I've played around with these with no luck;
Attribute(LEname, ATTR_ID_BACK_RGB_COLOR, "255 255 255")
and  ATTR_ID_BACK_COLOR 

I also tried this, On Element Immediate Change with a Throwfocus to another LE. It works great however, then you cannot manually enter data into the LE.

I thought it may have had something to do with Highlight mode also, and checked the INI file, but I have "Highlight On Enter" turned off. The insert key doesn't seem to make a difference for me.

  
Back to top
IP Logged
 
Rick_R
Full Member
***
Offline



Posts: 243
Joined: Jan 29th, 2010
Re: Combo Box help
Reply #4 - Dec 9th, 2011 at 11:56pm
Print Post Print Post  
"I also tried this, On Element Immediate Change with a Throwfocus to another LE. It works great however, then you cannot manually enter data into the LE."

I think you have to just use On Element Immediate Change in conjunction with something that sets the attribute color, not also throwfocus elsewhere.

Regarding ATTR_ID_BACK_COLOR, that is just a substitute for a number.  Did you include the .sbas file with the compiler definitions?  That's where that is defined.
  
Back to top
 
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Combo Box help
Reply #5 - Dec 10th, 2011 at 1:27am
Print Post Print Post  
Hello Rick,

Yes, I did include the .sbas file.

It seems as though the highlighting, if-you-will, is actually indicating the "active element", after the field is populated with the selection. It's similar to when you drag your mouse across the data, or when you double click in an LE. I don't find anything that will change that behavior. It seems like it's the nature of the beast, and happening before any code changes can be applied.

@PopupChoiceList for example, doesn't seem to activate the field receiving the data. So, if I could get the Combo Box to act the same way after selection, I'd be all set.
  
Back to top
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Combo Box help
Reply #6 - Dec 10th, 2011 at 5:51pm
Print Post Print Post  
My solution was to build a button called "Print Form" using @PrintAForm.

When the button is clicked, I Throwfocus to this button before the @PrintAForm command.

May not be beautiful but it works.....
  
Back to top
IP Logged
 
tcgeo
Full Member
***
Offline



Posts: 278
Location: Traverse City, Michigan
Joined: May 13th, 2008
Re: Combo Box help
Reply #7 - Dec 11th, 2011 at 3:37pm
Print Post Print Post  
Just to beat this to death, mainly because its cold here and there isn’t much else to do until May, etc., I stumbled on another interesting find. If I use the Printing Commands menu button: “Print Forms: Current”, the issue goes away. If I use @PrintAForm the LE prints highlighted.

While continuing to search for the culprit, I happened on “Set Navigation Order”.  The Combo Box was set as the first position in Navigation Order because I had added this LE to the form last. If I set it to anything other than first position my issue goes away. 
  
Back to top
IP Logged