shiftrelative to
suppose I have 3 field to display in vertical, if a is empty, then not
display a and shift b and c upward, if b is empty then shift c upward, I
know we can use region to enclose the dbtext and set shiftrelativeto, but as
the example above, it need 3 region and if the no. of field which need this
property increase, the code becomes quite complex with many shiftrelativeto.
So is there any simpler method to complete the task of 'if a is empty, don't
show a and shift the lower component upward, then if b is empty,
shift......upward'
display a and shift b and c upward, if b is empty then shift c upward, I
know we can use region to enclose the dbtext and set shiftrelativeto, but as
the example above, it need 3 region and if the no. of field which need this
property increase, the code becomes quite complex with many shiftrelativeto.
So is there any simpler method to complete the task of 'if a is empty, don't
show a and shift the lower component upward, then if b is empty,
shift......upward'
This discussion has been closed.
Comments
Instead of using three regions, try placing your dbtext objects inside one
region with Stretch set to True. Then be sure the lower dbtexts have their
ShiftWithParent properties set to True. This should shift the fields up
when one is empty.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
upward. IN my case, there is three label(deposit, discount amount and total)
and three dbtext corresponding, If deposit is 0, then I set the label
'deposit' and the corresponding dbtext visible property to false but the
lower label 'discount' and its corresponding dbtext don't shift upward even
their shiftwithparent properties is true, so is there any other method?
thx!
there is only one region, the region surround the non-shift component and
the shifted component is placed under the region with shiftwithparent set to
true, but this is not enough for handle my question, my question is if there
are a,b,c . a or b can be not visible and if this is true, b or c need to
shift upward, if the region surrounding a & b, then if a is non-visible,
then b can't shift upward. if the region surround a only and b and c below
the region, then if b is non-visible then c can't shift upward, this is my
problem in using the suggested solution
Sorry, I only did a simple test before makeing the suggestion. The only
other option I see is to create a region for each item that needs to be
shifted as you mentioned in your first post.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com