Home > Community > Forums > PCB SKILL > How to select specific Tab in form and specific row in grid

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 How to select specific Tab in form and specific row in grid 

Last post Tue, Jul 31 2012 5:03 AM by fxffxf. 7 replies.
Started by Ejlersen 30 Jul 2012 05:58 AM. Topic has 7 replies and 2340 views
Page 1 of 1 (8 items)
Sort Posts:
  • Mon, Jul 30 2012 5:58 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 569
    • Points 10,080
    How to select specific Tab in form and specific row in grid Reply

    Hi

    I've created a multitab UI and would like to know if there is a way to startup on a specific tab of the program. All settings are saved as attachments and I could easily store this also, but I've not been able to find any help regarding this in the documentation.

    My second challenge is that I'm also working with a grid based form (it is not multirow enabled) on one of the tabs where rows can be moved up and down, for this I would like to know if there is a way to do a rowselect of a specific row?

    Best regards

    Ole

    Best regards Ole
    • Post Points: 35
  • Mon, Jul 30 2012 6:31 AM

    • Pawandeep
    • Top 75 Contributor
    • Joined on Sat, Oct 15 2011
    • Singapore, 00-SG
    • Posts 106
    • Points 1,690
    RE: How to select specific Tab in form and specific row in grid Reply
    Hi Ole,

    For your second question, you can try this below command for selecting particular row/col

    For row select:

    axlFormGridOptions(f1s "Grid" 'goto 1)

    For col select:

    axlFormGridOptions(f1s "Grid" 'goto 1:2)

     
    Regards,
    Pawan
    • Post Points: 20
  • Mon, Jul 30 2012 6:45 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 569
    • Points 10,080
    Re: RE: How to select specific Tab in form and specific row in grid Reply

    Hi Pawan

    Thank you for your reply. 'select is the correct command to select the row. Unfortunately it only partly solved the problem.

    I'm implementing an up/down that should move rows up and down.

    So selecting a row and pressing Up moves the selected row one row up

    I would then like to be able to press up again to move it one more row up. But the problem is that even 'select does not give me the correct row for the form, so it stays at the original selected row. 'goto does not change this, do you have any suggestions for this?

    Best regards

    Ole

    Best regards Ole
    • Post Points: 5
  • Mon, Jul 30 2012 7:07 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 296
    • Points 4,710
    Re: How to select specific Tab in form and specific row in grid Reply

    1) change tab displayed

       axlFormSetField(form "<name of tab> 1)

                  - in the form file add "OPTIONS tabsetDispatch" to the "TABSET" definition (see example axlform.il/axlform.form; look for f1s_lastTab)

                 - the form dispatches the <name of tab> as the curValue to the "TABSET" field name when the tab is changed.

                 - <name of tab> the name displayed to user & in the form file is the name in the "TAB" definition.

     

    2) try using the 'select option with  axlFormGridOptions

    • Post Points: 20
  • Tue, Jul 31 2012 1:22 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 569
    • Points 10,080
    Re: How to select specific Tab in form and specific row in grid Reply

    Hi

    Changing tab is fine

    'Select does not select the correct row, it keeps staying at the current row

    Example:

    I select row 3

    printf("%L:\t(%d,%d) %L\n", fg->event, fg->row, fg->col, fg->curValue) will show the following: rowselect: (3,0) t

    I now do a

    axlFormGridOptions(fg "grid" 'select fg->row - 1)

    It visually shows the fg->row-1 as selected but the result of the print command is still the same

    printf("%L:\t(%d,%d) %L\n", fg->event, fg->row, fg->col, fg->curValue) will show the following: rowselect: (3,0) t

    So somehow it does not change fg->row

    What is causing this situation?

    Best regards

    Ole

    Best regards Ole
    • Post Points: 20
  • Tue, Jul 31 2012 4:45 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 296
    • Points 4,710
    Re: How to select specific Tab in form and specific row in grid Reply

    The form handle data reflects the result of the last form event and is not updated when you programmatically change form data. You can see the same behavior if your Skill code changes the content of the active field. The form handle curValue will still show the previous contents.

    • Post Points: 20
  • Tue, Jul 31 2012 4:57 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 569
    • Points 10,080
    Re: How to select specific Tab in form and specific row in grid Reply

    Hi

    Is there a way to get around this? apart from saving the latest row number into a global variable or an attachment?

    Ole

    Best regards Ole
    • Post Points: 20
  • Tue, Jul 31 2012 5:03 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 296
    • Points 4,710
    Re: How to select specific Tab in form and specific row in grid Reply

     not that I can think of.

    • Post Points: 5
Page 1 of 1 (8 items)
Sort Posts:
Started by Ejlersen at 30 Jul 2012 05:58 AM. Topic has 7 replies.