MultiValue Tools

 View Only

 Accuterm GUI - Setting focus on a grid cell

Steven Douglas's profile image
PARTNER Steven Douglas posted 04-17-2023 14:16

I feel like I must be missing this but have been unable to find it in the documentation.   Is there a way to set the focus to a particular grid cell in code?   I have a grid with a selection box.  If the user selects a given row I would like to take them immediately to the text box in column X on that row for input.  Thanks.

Joe Goldthwaite's profile image
Joe Goldthwaite
Hi Steven,
I think you just use the ATGUISETPROPS and set the GPCOLUMN and GPROW to the column and row you want to activate. You can use the ATGUIATIVATE Subroutine to activate the grid. I don't know if that's needed though. The documentation says that setting the property activates that cell and scrolls it into view.
The documentation for the properties is in the section on the ATGUICREATEGRID function I've had trouble finding them so don't feel bad.
Joe Goldthwaite.
Kathleen Hambrick's profile image
Kathleen Hambrick

Hi Steven, I am no expert, but having just learned how to use accuterm GUI maybe something that stumped me is stumping you?  The events you have assigned still kick, in their order, with few exceptions. If the program is doing something before what you want it to do, perhaps you need to adjust an already set event within that control?

My two cents (three with inflation!)
Kathleen

Peter Schellenbach's profile image
ROCKETEER Peter Schellenbach

In response to Kathleen's comments, the event philosophy in AccuTerm GUI is that user-initiated actions send events, and programmatic actions do not. There are a few exceptions where programmatic actions will send an event, for example when hiding or showing a form, the form activate & deactivate events still fire. This is because it is cumbersome to accurately maintain the form  activation order in a host-side data structure. While you can modify the eventmask property of any control programmatically, it might be just as easy to maintain the program state in the host program and ignore events that are not important for the given state.

Steven Douglas's profile image
PARTNER Steven Douglas

Thanks all for the responses.   @Joe Goldthwaite  ATGUISETPROPS was what I needed.  That seems to work fine I just wasn't searching for the right thing.