SHOW CONTROL

Started by Mike Hatfield, October 18, 2024, 01:41:42 AM

Previous topic - Next topic

Mike Hatfield

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
Mike H

Stéphane Devouard

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
Stéphane Devouard
Portfolio | Work

Mike Hatfield

Mike H

jhendrickx00

  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//

martinp

Hey Mike, check your nomads panel header if you have SUPPRESS .VAL checked otherwise each variable has this attached to it

Mike Hatfield

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
Mike H

jhendrickx00

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//

martinp

#7
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.

James Zukowski

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.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Jane Raymond

#9
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.
Jane Raymond
Software Developer
PVX Plus Technologies Ltd.

Mike Hatfield

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.
Mike H

James Zukowski

Actually, I (and NOMADS) use Fonted Text for the prompts for the different fields. Works fine there.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services