hexagon logo

Has anyone done any 'advanced' Dialogs in PC-DMIS Basic?

I'm struggling with trying to produce an advanced dialog in PC-DMIS Basic, i.e. one where entry fields are turned on/off when certain radio buttons are clicked, data entry fields filled when selecting a feature in a combo box, etc. etc.

The Help isn't very helpful, and sometimes obviously wrong - unfortunately that help comes verbatim from the Cypress Enable product which is used in PCD, and googling doesn't help...

I've come quite far, but am having large problems with radio groups, as each radio group has it's items numbered 0-N, but the click event doesn't tell me which group has been clicked, just the number and (mangled) caption of the item, which means that I can only have one radio group in each dialog!? Button clicks give me the wrong button caption (I get "Cancel" when I click the "OK" button, and an empty string when clicking the "Cancel" button).

Also, I haven't managed to set the selected value of a listbox or radio group programmatically (DlgText, DlgValue, nothing happens) while the dialog is active.

It's not that I have to do it, it started as a way to try to learn using Dialog events in Basic, hopefully to be able to tell others how to do it, but I'm on the brink of giving up now after two days of experimentation (OK, I've done some SW support during those days, too) and frustration.

Has anyone fiddled with this? Any insights? Examples?
Parents

  • Total understand. The reason for the request was to make sure I understood your post correctly. I have done something maybe similar to this with a check boxes and using drop down list boxes. Example: If a list box preference selection will change what choices are shown in another drop down list box. I believe this is what you are trying to do with the Radio buttons within a group.


    Yes, more or less. I have worked out how to react on the radio buttons, the problem there is when I want more than one group of radio buttons in the same dialog, as the .Events doesn't identify the group of the clicked item, only its number in the group. This means that the only way of identification is the text of the radio buttons, which makes the code a translation nightmare, and still don't allow differentiation between two buttons in separate groups if they happen to have the same text (and the same position inside its group). A redesign of the dialog solved the case at hand (the small radio groups changed to combo boxes instead), but it would be good to have a working (translatable) method for the general case.

    My second problem is that I haven't found any way to set what is selected in a combo box - I have two feature selection combo boxes, and when the first is selected, the same value should be selected in number two (but not vice versa). Not really necessary for this program, but definitely something I would like to be able to do.

    And my third problem is that I have to use PutText for some things, which means the code won't work in different languages without *a lot* of work :-(

    A teaser picture of what I'm trying to do (to save a lot of typing):



    which would then add the following to the current pp:

    NEWFEAT1   =GENERIC/CIRCLE,DEPENDENT,CARTESIAN,IN,$
                NOM/XYZ,<SLTR1.TX,SLTR1.TY,SLTR1.TZ>,$
                MEAS/XYZ,<SLTR1.X,SLTR1.Y,SLTR1.Z>,$
                NOM/IJK,<SLTR1.TI,SLTR1.TJ,SLTR1.TK>,$
                MEAS/IJK,<SLTR1.I,SLTR1.J,SLTR1.K>,$
                DIAMETER/30+V2,30+V2
    
Reply

  • Total understand. The reason for the request was to make sure I understood your post correctly. I have done something maybe similar to this with a check boxes and using drop down list boxes. Example: If a list box preference selection will change what choices are shown in another drop down list box. I believe this is what you are trying to do with the Radio buttons within a group.


    Yes, more or less. I have worked out how to react on the radio buttons, the problem there is when I want more than one group of radio buttons in the same dialog, as the .Events doesn't identify the group of the clicked item, only its number in the group. This means that the only way of identification is the text of the radio buttons, which makes the code a translation nightmare, and still don't allow differentiation between two buttons in separate groups if they happen to have the same text (and the same position inside its group). A redesign of the dialog solved the case at hand (the small radio groups changed to combo boxes instead), but it would be good to have a working (translatable) method for the general case.

    My second problem is that I haven't found any way to set what is selected in a combo box - I have two feature selection combo boxes, and when the first is selected, the same value should be selected in number two (but not vice versa). Not really necessary for this program, but definitely something I would like to be able to do.

    And my third problem is that I have to use PutText for some things, which means the code won't work in different languages without *a lot* of work :-(

    A teaser picture of what I'm trying to do (to save a lot of typing):



    which would then add the following to the current pp:

    NEWFEAT1   =GENERIC/CIRCLE,DEPENDENT,CARTESIAN,IN,$
                NOM/XYZ,<SLTR1.TX,SLTR1.TY,SLTR1.TZ>,$
                MEAS/XYZ,<SLTR1.X,SLTR1.Y,SLTR1.Z>,$
                NOM/IJK,<SLTR1.TI,SLTR1.TJ,SLTR1.TK>,$
                MEAS/IJK,<SLTR1.I,SLTR1.J,SLTR1.K>,$
                DIAMETER/30+V2,30+V2
    
Children