Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Ctrls<>() Callback / Disable some rows
Re: Ctrls<>() Callback / Disable some rows [message #9998 is a reply to message #9991] |
Wed, 13 June 2007 09:33   |
 |
mirek
Messages: 14266 Registered: November 2005
|
Ultimate Member |
|
|
kcabobert wrote on Tue, 12 June 2007 16:31 |
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")).
|
Just a note: This was supposed to use those Id (or SqlId) things, like:
Id PRIMARY_KEY("PRIMARY_KEY"); // possibly global, "Id constant"
....
AddIndex(PRIMARY_KEY, "id");
Using char * there works as well, but it is a but more error prone (you can mistype the string) and U++ has to perform char * -> Id conversion. That is especially not very helpful if you are looping through the ArrayCtrl values.
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.
Well, Ctrls part of ArrayCtrl seems to be really deficient.
I was thinking about the issue a lot and really the problem seems to be that we have stepped out of U++ paradigm here, introducing class factory, which is nice to solve simple problems, but fails with more complicated ones.
I plan to add some other interface for embeding widgets into ArrayCtrl that will rather use widgets that belong outside the ArrayCtrl (e.g. in the dialog). Something like:
struct MyDialog {
Array<Option> option;
void OptionColumn(Ptr<Ctrl>& ctrl, int index)
{
ctrl = &option.At(index);
}
MyDialog() {
list.AddColumn("Options").Ctrls(THISBACK(OptionColumn));
}
};
This way, you would have the full access to the list of options.
What do you think?
Mirek
|
|
|
 |
|
Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: unodgs on Tue, 12 June 2007 23:02
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: unodgs on Tue, 12 June 2007 23:36
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: mirek on Wed, 13 June 2007 09:39
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: unodgs on Wed, 13 June 2007 10:37
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: mirek on Wed, 13 June 2007 09:33
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: mirek on Wed, 13 June 2007 10:53
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: unodgs on Thu, 14 June 2007 08:18
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: unodgs on Mon, 18 June 2007 21:52
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: unodgs on Mon, 18 June 2007 21:57
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: unodgs on Mon, 18 June 2007 23:50
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: unodgs on Tue, 19 June 2007 10:58
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: unodgs on Tue, 19 June 2007 15:58
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: unodgs on Tue, 19 June 2007 15:56
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
By: mirek on Tue, 19 June 2007 22:01
|
 |
|
Re: Ctrls<>() Callback / Disable some rows
|
Goto Forum:
Current Time: Fri Jul 18 07:19:00 CEST 2025
Total time taken to generate the page: 0.03374 seconds
|