` Printed Icetips Article

Icetips Article



Par2: User control of locator types
2009-04-03 -- Dennis Evans
 
If you mean can a locator on the screen change from an entry locator to 
an incremental or maybe a filter locator and then to step locator then the 
answer would be yes.  I assume that you are looking to use only two types, 
i.e. entry and incremental or incremental and filtered.

In a nutshell, all the locator classes are derived from a base locator 
class, starting with the step, then entry, then incremental and finally 
filtered.    So if you want an entry, incremental combination on a screen 
add the incremental, since it is derived from the entry,  then when the user 
wants an entry you would change the way the key strokes are handled.  add 
some code to the take Key method of the incremental before the parent call,

  if (condition = entry locator)
    return parent.takeKey()
  end

that will return 0 so the browse is not updated until the control is 
accepted, but it will put the key press in the entry control.

Ghange the control type from string to an entry control when the user 
changes the condition.



Printed November 21, 2024, 11:33 am
This article has been viewed/printed 35209 times.