How to get focus on particular control on form..
JAYESH
Member Posts: 290
I have once small query..
I want to give focus on particular control on to the form..
for eg..
if ok := yes then
i want the control on particular text box on to the form...
if any one have answer..i request you to give me..thanks ....
I want to give focus on particular control on to the form..
for eg..
if ok := yes then
i want the control on particular text box on to the form...
if any one have answer..i request you to give me..thanks ....
JAYESH PATEL
0
Comments
-
Firstly, you must give a name to the control. Then:
CurrForm.NamedControl.ACTIVATE;0 -
I try the same..
CurrForm."No.".ACTIVATE;
But the cursor is move to next control...
i wrriten this code on on activate trigger of the NO. field..
IS is OK ???
I want when i got some value when the user input any thing in text boz..
eg..if the value which user enter is ' yes' then cursor dont move on next control..the cursor must be stay there with the old value......JAYESH PATEL0 -
Navision's user interface can be a serious pain to control in any meaningful manner at times, it has automatic behaviour that can be difficult to override.
There are properties each control can have that passes focus to another one on input. It also depends on where you put your code and exactly what you are trying to do. Sometimes you can put the checking code in the next control, of which this is an example that does not pass control from the first text box to the second unless the number is 1 (the check code is in the OnActivate of the second textbox):OBJECT Form 70000 numtest { OBJECT-PROPERTIES { Date=09/04/07; Time=21:13:55; Modified=Yes; Version List=; } PROPERTIES { Width=6930; Height=2090; } CONTROLS { { 1000000000;TextBox;660 ;770 ;1700 ;440 ;Name=NumControl; SourceExpr=num } { 1000000001;TextBox;4180 ;770 ;1700 ;440 ;Name=NumControl2; SourceExpr=num2; OnActivate=BEGIN IF num <> 1 THEN CurrForm.NumControl.ACTIVATE; END; } } CODE { VAR num@1000000000 : Integer; num2@1000000001 : Integer; BEGIN END. } }
Which form are you trying to do this in?
If you could post your code as a text it would help to see exactly what context in which you are trying to do what you want.0 -
i have one module named as ELB..
in that one text box is there...
i written code on text box - on validate trigger..
if the value of the text box is changed then they have to change the item ledger entry releted to that no....
so when they are changing the value , it ask for confirmation ...do u want to change the no...i want, when they press no..then the cursor appear in to the same text box with the original value..
i try for this..but the value is change in the text box when they click on no button on confirmation message...and the cursor is appear in to the next text box...
but i only want that when they click on no button in the confirmation..the cursor is go to the same text box..with the original value...
i written code in the onvalidate trigger of the no text box...JAYESH PATEL0 -
JAYESH wrote:if the value of the text box is changed then they have to change the item ledger entry releted to that no....
Just noting that Item Ledger Entries are not usually there for changing.
I assume "No." is some custom field you added?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 333 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