我有一个显示语句,如果逻辑为真,我只显示其中一个值。我怎么能不显示列的标签(即空白)
def var one as char label "one" no-undo.
def var two as char label "two" no-undo.
def var three as char label "three" no-undo.
def var four as char label "four" no-undo.
def var logic as logi no-undo init no.
display
one
two
three
four when logic
with stream-io width 80.
答案 0 :(得分:4)
define variable one as character no-undo initial "xyz".
define variable two as character no-undo initial "123".
define variable f as handle no-undo.
define variable h as handle no-undo.
form
one two
with frame a
.
f = frame a:handle.
if two = "" then
do:
h = f:first-child.
walk_tree: do while valid-handle( h ):
if h:name = "two" then
do:
h:label = "x".
leave walk_tree.
end.
h = h:next-sibling.
end.
end.
display
one two
with frame a
.
答案 1 :(得分:0)
简单方法:
def var a as char label "One" init "AAA".
def var b as char label "Two" init "BBB".
def var c as char label "three" init "CCC".
def var logic as logical init false.
form a b c with frame a no-underline.
if logic = false then c:label in frame a = "".
display a b c when logic with frame a.