Hiding Fields using :HIDDEN

Hi,
Benji again

With the following piece of code, the field xxx and label is hidden.

/*** correct code ****/
def stream s1.
def var w1 as char.
def var w2 as char.
def var w3 as log.

w3 = yes.
w1 = "aaa".
w2 = "bbb".

form w1 w2 with frame 1.
if w3 then
assign w2:hidden in frame x1 = true.
output stream s1 to TERMINAL.
display stream s1 w1
w2 when not w3 with frame x1. output stream s1 close.

/**** end correct code *****/

However with the following piece of code, the data is hidden but not the label.
I want field data and label to be hidden.

/*** bad code ****/
def stream s1.
def var w1 as char.
def var w2 as char.
def var w3 as log.

w3 = yes.
w1 = "aaa".
w2 = "bbb".

form w1 w2 with frame 1.
if w3 then
assign w2:hidden in frame x1 = true.
output stream s1 to /tmp/benji.
display stream s1 w1
w2 when not w3 with frame x1. output stream s1 close.

/**** end bad code *****/

Any help much appreciated.



------------------
 

Chris Kelleher

Administrator
Staff member
Hi Benji-

This behaviour looks strange, I wasn't aware of it. I would suggestion changing your if statement as follows as a workaround:

<BLOCKQUOTE><font size="1" face="Arial, Verdana">code:</font><HR><pre>
IF w3 THEN
ASSIGN
w2:HIDDEN IN FRAME x1 = TRUE
w2:LABEL IN FRAME x1 = "".
[/code]

HTH.

-Chris

------------------
Chris Schreiber
ProgressTalk.com Manager
chris@fast4gl.com
 
Top