Function "activate" on Controls selects wrong control

StLi
Member Posts: 83
Hi,
I Build a Form, supposed to be used on a terminal with a touchscreen display and a a barcode scanner. The scanner automaticly adds an enter at the end of the scanned text and I want to manage the next selected Control manually.
However after the execution there is always the next control active right after the one my code decided to select. (yes, i checked the properties - I'm using the correct control Names)
I guess this is because Navision somehow selects the next control AFTER the code is executed so the Enter/Tab sends the focus to the next one. But i have no idea how to prevent that.
My code currently runs in the "OnValidate"-Trigger but i also tested the "OnAfterValidate" - same result. "OnDeactivate" ends up in a deadloop... I ran out of ideas.. I don't wanna change everything up to predict that behavior because it's not the "right" way and because it will be confusing once the code will be analyised for modifications in the future.
Thanks in advance!
StLi
I Build a Form, supposed to be used on a terminal with a touchscreen display and a a barcode scanner. The scanner automaticly adds an enter at the end of the scanned text and I want to manage the next selected Control manually.
However after the execution there is always the next control active right after the one my code decided to select. (yes, i checked the properties - I'm using the correct control Names)
I guess this is because Navision somehow selects the next control AFTER the code is executed so the Enter/Tab sends the focus to the next one. But i have no idea how to prevent that.
My code currently runs in the "OnValidate"-Trigger but i also tested the "OnAfterValidate" - same result. "OnDeactivate" ends up in a deadloop... I ran out of ideas.. I don't wanna change everything up to predict that behavior because it's not the "right" way and because it will be confusing once the code will be analyised for modifications in the future.
Thanks in advance!
StLi
0
Comments
-
I have had the same problem, and the only solution i have found so far is a workaround : Add a dummy control to your form, set the taborder so that the control AFTER it is the one you want activated, then ACTIVATE the dummy one.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions