Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » How to hide/show gridctrl column at runtime
Re: How to hide/show gridctrl column at runtime [message #48745 is a reply to message #44456] Sat, 09 September 2017 21:33 Go to previous message
forlano is currently offline  forlano
Messages: 1214
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I am resuming this old thread because my problem is exactly the same (U++ 11300, MS2017).
My GridCtrl has 16 columns and the one in position 15 is hided.
Then an OptionButton hide/show it when pressed. Here is the code:
void VegaTab1::ShowInfoCol()
{  
   if (optGrid.Get()) {
   	  grid.GetColumn(15).Hidden(false);
   	  grid.Repaint(true, false);
   }
   else {
   	  grid.GetColumn(15).Hidden(true);
   	  grid.Repaint(true, false);
   }
}

If I show/hide that column several times, I observe that the grid looks each time differently. In particular column 15 (the one I hide/show) decrease its width constantly up to become very little after many show/hide.
It seems the grid is not recalculating properly its dimensions.

Is this a bug? Is there a better way to achieve the same result?

Thanks,
Luigi

[Updated on: Sat, 09 September 2017 21:34]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Change row appearance based on column value in that row
Next Topic: Header in body
Goto Forum:
  


Current Time: Sun Aug 24 03:54:05 CEST 2025

Total time taken to generate the page: 0.04250 seconds