Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 29 APR 1999 03:30:27PM Gene Sorbo wrote:

Is there a way to programatically force a tab to occur in OI?

I want to do this under two circumstances:

1) The user executes a save on a form but has not tabbed out

of a control where new data has been entered before doing so (OI does not seem to recognize the 'new' data as having been entered until you actually leave the control).

2) After a set number of characters has been entered into a control (i.e., if the number of chars to be entered in a control is 4, AFTER user enters the 4th character, tab occurs). Setting TABOUTEXCEEDS and LIMIT does not quite do this (i.e., if character limit is 4, tab doesn't occur unless 5th character is entered…).

Any ideas?

Thanks.

Gene


At 29 APR 1999 05:02PM Matt Sorrell wrote:

Gene,

Does OI have SendKeys or something similar? I'm not sure, but it seems like that is the way to go. Either that, or in certain conditions instead of trying to execute a TAB, you could setfocus to another control. That should have the same effect.

Matt Sorrell

[email protected]


At 29 APR 1999 06:03PM [email protected] - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:

It sounds like you want to force a lostfocus event more than anything else. However, OI should generate a lostfocus, or at least data validation on the last field entered when a write is executed. If this is coming off a menu, check the generate lostfocus event box.

For the character limit, what you'll need to do is create a CHAR event which will count the number of characters then stop entry if it's exceeded a certain threshold. Shold be doable in about a dozen lines of code.

[email protected]

Sprezzatura Group

www.sprezzatura.com_zz.jpg


At 29 APR 1999 06:09PM Don Bakke wrote:

Gene,

OI sends a LOSTFOCUS to the current control when the user initiates a save. Therefore it is not necessary to tab out of a control for OI to recognize a change. The only time where this is a problem is if you programmatically update the TEXT property of a control rather than the DEFPROP/INVALUE property.

For the other problem you could use the CHAR event to track the total number characters entered and then move the focus to another control when appropriate.

[email protected]

SRP Computer Solutions


At 29 APR 1999 07:01PM Gene Sorbo wrote:

Don,

]

Interesting. The way my app works, for various reasons, when the user chooses SAVE from the menu, I first do a check against SAVEWARN to determine if the SAVE should occur. SAVEWARN is only set to 1 when the user physically tabs out of the control before saving…! I will consider using a Set FOCUS event to work around this.

]

Great suggestion.

Thanks Don.

Gene


At 29 APR 1999 07:02PM Gene Sorbo wrote:

Aaron,

Thanks for the info. on both questions.

Gene


At 29 APR 1999 10:22PM Don Bakke wrote:

Gene,

SAVEWARN hasn't been set because the system level WRITE event hasn't yet been invoked (it occurs after your form level WRITE event). So the best thing to do is what Aaron suggested and you have already figured out: send your own LOSTFOCUS to the control with focus then check the SAVEWARN property.

[email protected]

SRP Computer Solutions

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/a90363ed8448aa0985256762006b28b4.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1