what code you need to enter depends on the requirement. Assume you have a select combo 
box which is always selected, by default, when you open a form. Now if ur requirement 
is to always have the focus on the grid (u need to autodeclaration have as true on the 
property of the grid). Now in the form have the firstField (this is an override 
method) and write as below:
public void firstField(int _flags=1)
{
   super(_flags);

   grid.setFocus();
}

hope this will help you.

cheers,
Girish

-----Original Message-----
From: Ferry Widjaja [mailto:[EMAIL PROTECTED]
Sent: 16 September 2003 02:48
To: [EMAIL PROTECTED]
Subject: RE: [development-axapta] Method for Set Focus a control


Hi Girish,


Where should I put the method? Can I simply write down the method like this:
   public void FirstField()
   {
       salesitemidsearch.setFocus();
   }

Please advice. Thank you


Rgrds,


Ferry

-----Original Message-----
From: Girish Bhatkal [mailto:[EMAIL PROTECTED]
Sent: Monday, September 15, 2003 2:39 PM
To: [EMAIL PROTECTED]
Subject: RE: [development-axapta] Method for Set Focus a control


Hi,


First you need to declare or autodeclare the property of the field/grid , on the form.
If you need to always set focus to a control when the form opens then you should use the method "firstField" and here u write to setfocus the required field say grid.setfocus(); (after the super()). similarly set focus to the next object , on the method activated when the control leaves the field.


cheers,
Girish

-----Original Message-----
From: Ferry Widjaja [mailto:[EMAIL PROTECTED]
Sent: 15 September 2003 08:11
To: Development-Axapta
Subject: [development-axapta] Method for Set Focus a control



Hi guys,

Is there anyone that can help me for making a method to set focus a control
when a form is opened? And, how to make a method to set focus to another
control when the cursor leaves a control? Thank you.


Rgrds,


Ferry



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.





Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.




Yahoo! Groups Sponsor ADVERTISEMENT
Click to learn more...


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Reply via email to