Jump to content

Is it possible to use a variable for Set Selection command?


This topic is 3079 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I ran into a snag or bug with Date fields: In the style set for them (Drop-down Calendar), I have the following:

Normal (light blue fill)

Hover (white fill)

Pressed (white fill)

In Focus (white fill)

The problem is, when you click once in the field, the fill turns light blue but when you click again, then it turns white (as it should with the first click).

Unless there's something wrong with the set-up (or there's a bug), the only workaround I can think of is to set an OnObjectEnter script trigger where, when you click once inside the field, it fires the Set Selection script command using a Start Position of zero. That solution works, but there's a hiccup: I have a lot of date fields in the solution so to save a lot of field-level coding in the script, I thought, "I'll just assign a variable using the Get (ActiveFieldName) command...but the problem with that is Set Selection requires a "hard" field selection--as far as I can tell, you can't assign a variable in that command for a field. So, if you have any ideas how I can make a simple, elegant script to achieve the same end, I'd appreciate it. Thanks!

Edited by WF7A
Link to comment
Share on other sites

This topic is 3079 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.