PxPlus User Forum

Main Board => Discussions => Nomads => Topic started by: Mike Hatfield on October 18, 2024, 01:41:42 AM

Title: SHOW CONTROL
Post by: Mike Hatfield on October 18, 2024, 01:41:42 AM
If my panel I have a fonted text control named SELECT.TEXT with some instruction text for the user.
The attribute is "Initially Hidden"

There is an argument in the calling program ARG_4$
When it is set to "INVOICE_ENTRY" I want to SHOW the control on the panel.

I've added this line to the default program.
If ARG_4$="INVOICE_ENTRY" SHOW CONTROL SELECT.TEXT
I can't get this to work
Why Not??

THanks
Title: Re: SHOW CONTROL
Post by: Stéphane Devouard on October 18, 2024, 06:49:03 AM
Mike H

Nomads loads the control id in a variable with a .CTL suffix

Try :


IF ARG_4$="INVOICE_ENTRY" SHOW CONTROL SELECT.TEXT.CTL
You could also use Dependency Definition for this
Title: Re: SHOW CONTROL
Post by: Mike Hatfield on October 19, 2024, 02:18:55 AM
Still doesnt work
Title: Re: SHOW CONTROL
Post by: jhendrickx00 on October 19, 2024, 09:42:41 AM
  Uhmm, I don't know if the fonted text control is able to show/hide (I made a test and didn't work).

  Why you don't use a MULTI_LINE control instead? (With bordeless and locked attribs).

  Jean H//
Title: Re: SHOW CONTROL
Post by: martinp on October 19, 2024, 02:43:41 PM
Hey Mike, check your nomads panel header if you have SUPPRESS .VAL checked otherwise each variable has this attached to it
Title: Re: SHOW CONTROL
Post by: Mike Hatfield on October 19, 2024, 07:01:17 PM
MARTIN - Header has suppress.val checked.

I think you are right SHOW does not work with FONTEWD TEXT
Jean - I have finally got the SHOW to work with MULTI_LINE as you suggested.
HOWEVER, I had to move the directive from the initial section of the program to where the List Box is loaded.
I initially thought I could ECEUTE the code in the HEADER at POST-DiSPLaY but that didnt work either.
Now that I have changed to MULTI-LINE POST-Display works
Nomads is such a confusing product.
Some good working examples would be so much more helpful.

Thanks
Title: Re: SHOW CONTROL
Post by: jhendrickx00 on October 19, 2024, 07:48:27 PM
Hi Mike, many many moons ago, someone (Mike or Yvonne) said was better use MULTI_LINE (instead of Fonted Text) to have a greater control over the shown text. Indeed, yes, you're right, the fonted text would be the control to use... but ...

Also, the only 'use' I saw for the regular text (aka 'Fixed Text') is have some clickable titles, but, the other controls (like transparent buttons) isn't longer need ...

Perhaps some of the resident gurus have a better explanation.

Jean H//
Title: Re: SHOW CONTROL
Post by: martinp on October 19, 2024, 10:36:42 PM
Hey Mike, Looks like for fonted text you need to assign the text to a group (Utilities->Group Assignment) then use the following:

call "*wingrp;HIDE",YourGroupName.grp$ 
call "*wingrp;SHOW",YourGroupName.grp$

To do what you need if you are still interested in using a fonted text.
Title: Re: SHOW CONTROL
Post by: James Zukowski on October 21, 2024, 08:48:46 AM
The main reason it doesn't seem to work is that it isn't really an addressable control. It's text that is on the text plane, and the *wingrp routine deals with SHOW/HIDE separately.

I find that using a multi_line is much more effective, as I can drop whatever text I want into it and it's done.
Title: Re: SHOW CONTROL
Post by: Jane Raymond on October 21, 2024, 09:04:26 AM
To HIDE/SHOW something on a panel, I find it easy to use Dependency Definitions:
https://manual.pvxplus.com/page/NOMADS%20Graphical%20Application/Panel%20Designer/Options%20and%20Utilities/Dependency%20Definitions.htm
A dependency definition will hide/show controls automatically based on a condition.
Note: To use a Dependency for fonted text you would first have to assign it to a group, and hide the group.
Title: Re: SHOW CONTROL
Post by: Mike Hatfield on October 21, 2024, 04:25:21 PM
Thank you everybody for the help and comments.

Four days of frustration could have been avoided if the documentation noted that SHOW/HIDE doesn't apply to Fonted Text as it does for other controls.
In fact, from what I'm reading in these replies the documentation should be amended to recommend that Fonted Text not even be used as it's historic and retained for compatibility.
Title: Re: SHOW CONTROL
Post by: James Zukowski on October 21, 2024, 04:27:32 PM
Actually, I (and NOMADS) use Fonted Text for the prompts for the different fields. Works fine there.