Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flex Lost / Got Focus event

Status
Not open for further replies.

zedsded

IS-IT--Management
Jun 9, 2002
68
Hi Guys,
I am new to Flex and currently working on OE screen. As I understand, the fields can't be updated until it has the focus...correct me if i'm wrong. So, I've done just that on my codes using GotFocus. I also found in my search in this forum that sometimes the LostFocus should be used to trigger what I wanted to do. Is there a rule of thumb I can follow as to when to use GotFocus versus Lost Focus. Thanks a lot, this forum has been really helpful.
 
No rule of thumb, especially on the OE0101 screen. Are you using Progression or ES and what version?

And more important, what specifically are you trying to do and why? What business issue is your flex code hoping to resolve?

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
dgillz,
What would I do without you? Thanks.
I'm using Progression. Basically just trying to get familiar with Flex. I'm currently on the OE screen and I can't even put a value on the macform.Type1 (listbox).
Code:
Private Sub Type1_GotFocus()
macForm.Type1.Text = "I=Invoice"
End sub

Thanks again.
 
If you are trying to se the value of he order type to I=Invoice, it may well be that this event does not fire. (I could not make this work in my testing). If you always want this field to be I=Invoice the place to do this is the screen designer.



Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
If you are trying to set the value of the order type to I=Invoice, it may well be that this event does not fire. (I could not make this work in my testing). If you always want this field to be I=Invoice the place to do this is the screen designer.



Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
Don't forget, or perhaps new as you are new to flex. Research vbSendKey or there about. I am not a machine with Macola, but You can use flex duplicate just about user keyboard input, thereby bypassing setting the field to a value.
 
I applied both your tips:
A default in Designer, then a LoseFocus event fires a dialogue prompting a user, from that point forward, I either used vbsendKeys or Focus Events. It' very basic but got me where I wanted. Most likely i'll be asking for more tips later on. Thank you guys!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top