[AccessD] Textbox special highlighting

jwcolby jwcolby at colbyconsulting.com
Tue Jan 3 09:25:48 CST 2012


Doug,

It turns out that text boxes can have a label associated with it.  Every control has a controls 
collection and *if "connected"* the label is controls(0).  Thus txtMyCtl.Controls(0) will let you 
manipulate the label for the text box.  You can then play with the label background color, font etc 
as you think might be useful.  I do precisely this in my framework, as I set up a text box for a 
double click event I change the label color to a different color of blue.

Of course I have a class for this.  ;)

John W. Colby
Colby Consulting

Reality is what refuses to go away
when you do not believe in it

On 1/3/2012 9:29 AM, Jim Dettman wrote:
> Doug,
>
>    Only thing that comes to mind is using the old trick of putting a control
> behind the control with a graphic and then setting the foreground control's
> background as transparent.
>
>   The only wrinkle would be knowing that on these controls, you'd need to set
> the background controls background rather then the foreground's (assuming
> you do that on the fly - if not, then it's not a problem).
>
> Jim.
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Steele
> Sent: Monday, January 02, 2012 07:14 PM
> To: Access Developers discussion and problem solving
> Subject: [AccessD] Textbox special highlighting
>
> Hello all:
>
> I would like to have a consistent method of highlighting textboxes so that
> a user knows that double clicking will result in the display of more
> information.  Ideally, it wouldn't involve changing the background or
> foreground colour, as I use these with conditional formatting for
> displaying other information (order quantity is greater than on-hand
> quantity, for instance).  Changing the border colour or thickness results
> in some very ugly grid displays.
>
> The ability to put a little triangle in one corner of the textbox would be
> ideal - the way Excel does for comments.  Does anyone have a brilliant
> solution?
>
> Thanks,
> Doug



More information about the AccessD mailing list