Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Mutually exclusive controls

edited May 2019 in OpenInsight
hi, Other than putting two mutually exclusive sets of controls on different pages, how can I show only one set at a time? The reason i don't like pages, is that you can tab to the other page, which is really bad, as the two pages are mutually exclusive...

I could do some stuff to make the tabbing to the other page not work, but i was wondering if there was another way?

This is what I mean, from outlook:

each option in the radio button p resents a different set of controls.

Comments

  • One way or another you will need to hide a sub-set of controls and unhide another sub-set as needed. There are two basic ways of handling this.

    First method: Put all the controls related to the radio group control on a single page form and hide them at design time. Then when the radio button is clicked you set the VISIBLE property to 0 for all controls that need to be hidden and then to 1 for those controls that need to be seen.

    Second method: Use a multi-page form and put those controls related to the radio group control on separate pages (i.e., one page per radio button). All other controls on the form should be set to All Pages so they are always visible. Then when the radio button is clicked you change the page as needed.
  • edited May 2019
    With some careful perhaps tedious planning, you can place all the controls on the one page, then use the click to manage visibility. Interesting you should use this example.
    Here's one I prepared earlier using the visibility method


    This was done the way Don suggests, using the VISIBLE property of the controls
  • edited May 2019
    "Second method: Use a multi-page form and put those controls related to the radio group control on separate pages (i.e., one page per radio button). All other controls on the form should be set to All Pages so they are always visible. Then when the radio button is clicked you change the page as needed."

    But you can still tab to the other page...I believe it's possible to stop this, but I don't really know what's involved. That's why i was hoping there was another way.

  • But you can still tab to the other page...I believe it's possible to stop this, but I don't really know what's involved. That's why i was hoping there was another way.

    You control this via the NEXT and PREVIOUS properties.
  • ok, so just make the next property of the last contorl on a page go back to the first...that sounds simple. I will give it a try.
  • @ausmarkb

    yes, I am trying to do exactly what you're doing. It's a program that lets the users schedule when somethign should happen.
  • Yes. We actually do this as a standard practice with normal multi-page forms. I think it provides better user experience to keep them looping on the same page until they indicate a desire to switch pages by clicking on a navigation control (like a tab). Most dialogs I see in other apps behave this way.
  • yeah i agree, which is why you would think it would be the default behavior, but not in OI. In oi, it automatically goes to the next page, and you have to write some code to make it not do this.
Sign In or Register to comment.