Jump to content

Conditional Formatting vs. Hide Object When


This topic is 2498 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello forum.  I'm in the process of rebuilding a FM12 db into a FM16 db.  I have many places where I used conditional formatting to hide an object.  Some layouts (mostly reports) there are many objects formatted this way.  I plan to change them to take advantage of 'Hide object when'.

Does anyone know which one renders faster?  Or is it a matter of 'it all depends'?

Thanks

Steve

Link to comment
Share on other sites

Hi Steve,

I would suspect Hide is faster.  Both redraw upon screen refresh but here are some thoughts on it:

  • Hide is a boolean on/off whereas conditional formatting must interpret and redraw portions (each attribute) of an object so I suspect Hide would be more efficient.
  • Hide applies to all objects within a group so one can hide an entire portal, tab control or grouped objects so is easier when dealing with multiple objects.
  • Conditional formatting does not work on lines around buttons.
  • Hide can (more easily?) apply also when in find mode.

I am sure there are other considerations.  In all, Hide is preferable in most cases whereas conditional formatting is geared towards changing a displayed attribute.  Hopefully others will offer their impressions as well.

Edited by LaRetta
added last bullet
Link to comment
Share on other sites

I don't know the answer to that and I don't know how one would go about measuring such thing. However, I have reasons to believe that hiding an object is more efficient than formatting it. If the code is well written, then a hidden object would be taken out of the rendering queue altogether - while the conditionally formatted object has to be rendered in context.

Link to comment
Share on other sites

One more ... conditional formatting cannot make text transparent but instead one must set the font size to extremely large (can fail in some display situations and let part of the text show) or one can color it the same as the background.  If you later change the background color and forget to modify the calculation, it will show.  

Link to comment
Share on other sites

Can't remember where I heard this, possibly a Devcon session, but as comment noted: with Hide Object, the layout rendering engine does not have to draw the object at all. So it should be theoretically if not perceptibly faster.

I also find it helpful when I'm looking at a layout to be able to distinguish which objects are actually getting formatted vs. those that are being hidden.

Link to comment
Share on other sites

This topic is 2498 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.