> I gather IupRefresh is for re-calculating the size of objects.  (Correct?)
>

   Yes.



> Thus when I change say the TITLE attribute of a IupLabel, then the label
> may become larger, have a different number of lines etc. and thus there
> should an IupRefresh following.  (Still correct?)
>

    Yes. Sometimes it is useful to leave room in the label, but if it fits
the previous text, and the new one is larger this may affect the whole
dialog layout, so it is necessary to call IupRefresh.

    If you know that the changes will affect only part of the dialog then
IupRefreshChildren can use used instead to re-compute the layout only for a
restricted group of controls.



> Same applies to say adding/removing elements.
>

   Yes.



> So far summarized: whenever something changes and I'm not completely
> sure that this does not affect size, I rather should follow up with an
> IupRefresh.  ??
>

    I think you should do it only if it does affect size.


This policy however is not as viable as I'd like it to be.  Having to
> update a simple listing of around 100 Iupcontrols became unbearable
> slow.  Turns out on my machine running this simple app a single
> IupRefresh takes something between 50ms and 200ms.  Has me waiting
> several seconds for a stable result.  Hence I need to conserve
> IupRefresh's.
>

  I still have to build a sample to reproduce this problem. Maybe there is
something we can optimize. But I don't have time now. If you could build a
simple C sample so we can compare and test, that would help a lot.



> So which refresh operations should I keep?  Somehow the docs suggest
> that any one IupRefresh on any element should be enough.  Is this
> correct?  (((Asking this because my experiments suggest that it's not
> enough, but this is not conclusive yet - maybe something else is wrong
> with the experiment.  After all issues don't arise until there are
> enough controls and activity.  So maybe my experiment is flawed.)))
>

   IupRefresh does not affects a single control. It affects all the dialog.
All the dialog layout, for all controls inside it, is recomputed when
IupRefresh is called, even is the parameter is a label deep down the dialog
hierarchy. If for every change you are calling IupRefresh, then do it only
once at the end of all changes. Is that the case?

Best,
Scuri
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to