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 » ArrayCtrl with enabled/Disabled columns
ArrayCtrl with enabled/Disabled columns [message #3042] Fri, 05 May 2006 07:09 Go to previous message
lundman is currently offline  lundman
Messages: 175
Registered: March 2006
Location: Tokyo
Experienced Member
I have an ArrayCtrl with 7 elements, like that of the output of
"ls":

index, name, user, group, size, date, perm

The first is an Index, and is not viewed. Next I thought it would be nice if the user could chose which fields are used. To avoid having to store which column is what in my code, I went down the route where I always add 7 elements, but turned them off or on depending on user selected options.

However, I could see no apparent way to just enable or disable a column. (is that the case? HeaderObject().HideTab(int) did nothing for me).

So, instead I went down the road where I either AddColumn(), or AddIndex() based on whether or not it is enabled.

This appears to work ok, except when I call .Reset() and re-add the Columns/Indeces. I lose the User set Width.

It would appear that I have a ColumnsWidths(char *) function to set them, but I am unsure how to get what they are. HeaderObject().GetTabWidth() seems to give me the default/initial width, not the current width.

On the other hand, Serialize() appears to work fine, but it works with streams. But perhaps that is the proper path? (Do I really need to open a stream just to save the widths?)

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ArrayCtrl grid color
Next Topic: ArrayCtrl cell consisting of edit and helper button
Goto Forum:
  


Current Time: Wed May 15 12:14:16 CEST 2024

Total time taken to generate the page: 0.01923 seconds