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 » Ctrls<>() Callback / Disable some rows
Ctrls<>() Callback / Disable some rows [message #9991] Tue, 12 June 2007 22:31 Go to previous message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
I have two issues... but don't want two threads (I'm lazy...).

First, let me setup the problem:

1) I have an ArrayCtrl which I populate dynamically (I read the values from a database based on search criteria entered elsewhere).

2) My ArrayCtrl has an Index column (via AddIndex("primary_key","id")), a column of options (via AddColumn("use","Use").Ctrls<Option>()), and a name column (via AddColumn("name","Name")).

3.a) I need to SOMETIMES assign a callback to the option column that will uncheck all other options (like a radio ctrl), other times multiple selections are OK. I can do this if I can reliably figure out in which row the option that triggered the callback resides (I need people to be able to select via mouse or keyboard).

3.b) In some cases I may want one option completely disabled (in other words one row disabled). However, I still need the row to list. In these cases removing the option ctrl is acceptable.

I have found two threads which appear to have similar needs / problems:
http://www.ultimatepp.org/forum/index.php?t=msg&th=602
http://www.ultimatepp.org/forum/index.php?t=msg&th=605

I am not so clear on what exactly the GridCtrl does... but I gather that it may allow me to accomplish this? As a note, I think I would prefer to leave this as an ArrayCtrl.

I have used the WhenCtrlsAction callback on the ArrayCtrl, but can not reliably decided which row tripped the callback.

Thanks for your help / thoughts,
Robert
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GridCtrl align text in column
Next Topic: GridCtrl - Child Ctrl, selected row, focus issue
Goto Forum:
  


Current Time: Sun May 19 02:18:45 CEST 2024

Total time taken to generate the page: 0.00662 seconds