Hot Topic (More than 10 Replies) Highlighting active field (Read 1305 times)
digimom1962
Junior Member
**
Offline


Natalie Gann

Posts: 92
Location: here
Joined: Nov 26th, 2004
Highlighting active field
Nov 4th, 2005 at 3:51pm
Print Post Print Post  
They want the active field highlighted like Q&A use to do. I can do it with @color on element entry & exit but there are ALOT of fields. I made the cursor blink which is some help but they really want the highlight.
Any shortcuts? (I did use ThisElement so I could just copy & paste w/no extra typing)
  

So much time and so little to do . . . strike that, reverse it.
Back to top
YIM YIM  
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Highlighting active field
Reply #1 - Nov 4th, 2005 at 7:15pm
Print Post Print Post  
Put the following code in:

GLOBAL CODE:
Code
Select All
stat g_name as string
g_name = ""
 



Your form's :: On Element Entry:
Code
Select All
if(g_name <> "")
{
  SetThisElement(g_name)
  RGBColor(ThisElement, 0, 0, 0, 255, 255, 255)
  UnSetThisElement()
}
g_name = @CurrentElement()
SetThisElement(g_name)
RGBColor(ThisElement, 0, 0, 0, 200, 220, 255)
UnSetThisElement()
ForceRedraw()
 

  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
digimom1962
Junior Member
**
Offline


Natalie Gann

Posts: 92
Location: here
Joined: Nov 26th, 2004
Re: Highlighting active field
Reply #2 - Nov 4th, 2005 at 9:07pm
Print Post Print Post  
Appreciate the help. Great to know I won't have to cut and paste about 200 times.

Unfortunately, it does not seem to work exactly as I expected. Once I leave the first field & click around the form the highlight lags one field behind. I pasted the code where you said and did not change anything.

Thanx again for your time
~digimom1962
  

So much time and so little to do . . . strike that, reverse it.
Back to top
YIM YIM  
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Highlighting active field
Reply #3 - Nov 4th, 2005 at 9:28pm
Print Post Print Post  
You have to change it use the colors you want to represent highlighted and not highlighted. The first RGBColor call represents the not highlighted colors.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
digimom1962
Junior Member
**
Offline


Natalie Gann

Posts: 92
Location: here
Joined: Nov 26th, 2004
Re: Highlighting active field
Reply #4 - Nov 4th, 2005 at 9:51pm
Print Post Print Post  
uhhhhh, now it leaves the fields that lovely powder blue after I leave the field. However...

I just changed it back to what you had the first time and, on a hunch, tabbed around the screen. Worked beautifully. It only gets wierd when you use the mouse to CLICK around the page. That's ok, the people that will use the program usually use the keyboard to navigate anyway. (I am the only one that is click-happy)

Blessings & thanx
  

So much time and so little to do . . . strike that, reverse it.
Back to top
YIM YIM  
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Highlighting active field
Reply #5 - Nov 4th, 2005 at 10:00pm
Print Post Print Post  
hmmmmmm, must be something different between 1.1.3 and 1.1.2 - it works fine for me with either mouse or keyboard.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
digimom1962
Junior Member
**
Offline


Natalie Gann

Posts: 92
Location: here
Joined: Nov 26th, 2004
Re: Highlighting active field
Reply #6 - Nov 4th, 2005 at 10:09pm
Print Post Print Post  
Roll Eyes upgrade time I guess!
  

So much time and so little to do . . . strike that, reverse it.
Back to top
YIM YIM  
IP Logged
 
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
Re: Highlighting active field
Reply #7 - Nov 25th, 2005 at 12:09am
Print Post Print Post  
Hi,

Unfortunately, I canīt undersand  how  to  correct 
that once I leave one field  the highlight lags one field behind.

How could be the script wen my fileds are white and want the Eintritt field Green?


  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Highlighting active field
Reply #8 - Nov 25th, 2005 at 12:21am
Print Post Print Post  
In 1.1.2 you have to put code in the on exit / enter events for each field - unfortunately. The generic method (shown above) will work for the keyboard only in 1.1.2.

In 1.1.3 it works with both keyboard and mouse.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Louis Galvao
Full Member
***
Offline


"Sufferin' Succatash"

Posts: 265
Location: Canada
Joined: Feb 14th, 2005
Re: Highlighting active field
Reply #9 - Dec 1st, 2005 at 7:48pm
Print Post Print Post  
This works very well in the latest upgrade.

Thanks,

Louis
  

Louis Galvao
Back to top
 
IP Logged
 
digimom1962
Junior Member
**
Offline


Natalie Gann

Posts: 92
Location: here
Joined: Nov 26th, 2004
Re: Highlighting active field
Reply #10 - Dec 2nd, 2005 at 2:42pm
Print Post Print Post  
He beat me to it Grin

It works beautifully now. Thanx again!
Natalie
  

So much time and so little to do . . . strike that, reverse it.
Back to top
YIM YIM  
IP Logged