OpenEdge Message and textbox focus

Posted by benantes on 18-Feb-2011 08:37

Hi,

We encounter a problem. In an ABL form, when we leave a textbox, if in the TextBox_Validating or TextBox_Validated

we show a message like :

METHOD PRIVATE VOID textBox1_Validated( INPUT sender AS System.Object, INPUT e AS System.EventArgs ):

DEFINE VARIABLE siok AS LOGICAL NO-UNDO.

MESSAGE "Test val"

VIEW-AS ALERT-BOX BUTTON YES-NO UPDATE siok.

IF siok = FALSE THEN DO:

textBox1:Focus()

END.

RETURN.

END METHOD.

If we answer yes or no, we always have focus on TextBox1. it doesn't enter next text box when we use TAB.

All Replies

Posted by bheavican on 18-Feb-2011 08:59

Which version of Progress?  I believe this was fixed in 10.2B02.

OE00192798

*

NETUI User Interface

When executing a 'MESSAGE ... VIEW-AS ALERT-BOX' in a LEAVE trigger for an ultraTextEditor which was the result of pressing the TAB key, focus stays in the ultraTextEditor.

10.2B02

Posted by benantes on 18-Feb-2011 09:02

We use 10.2A03 (Patch12)

Posted by rbf on 18-Feb-2011 11:00

Try setting the ActiveControl property of the form instead. It is more reliable than Focus() on the control.

Posted by bheavican on 18-Feb-2011 11:11

I think we used System.Windows.Forms.MessageBox:Show() to work around this as well.

This thread is closed