When to use RecalcLayout and Refresh


Author
Message
Kevin Harrison
Kevin Harrison
Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)Forum Guru (52 reputation)
Group: Forum Members
Posts: 52, Visits: 1

When should I use ReCalcLayout and Refresh?  I am trying to hide the axes, title and legend on an NChartControl when the size is reduced beyond a certain size.  This all appears to be working without using either option, so I am interested to know when they need to be used.

Thanks

Kevin


Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi Kevin,

When you resize the control it automatically recalc the layout and invalidate. In general we've opted for the .Refresh() method because that way you can make multiple changes to the chart document (add data, modify settings etc), without generating unecessary control invalidates - you can switch the control in autorefresh mode:

nChartControl1.AutoRefresh = true;

and then you'll not have to worry about refresh calls.



Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search