|
|
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » About ArrayCtrl options
About ArrayCtrl options [message #423] |
Mon, 26 December 2005 10:43 |
kverko
Messages: 8 Registered: December 2005 Location: Porva, Hungary
|
Promising Member |
|
|
I had like getting a new row after pushing Enter to commit the last edited row. I thought if I had set AppendLine(true) it would do that, but not any visible reaction.
What else should I do?
|
|
|
|
|
|
|
Re: About ArrayCtrl options [message #1762 is a reply to message #1741] |
Sat, 18 March 2006 08:52 |
|
mirek
Messages: 13984 Registered: November 2005
|
Ultimate Member |
|
|
kverko wrote on Fri, 17 March 2006 01:44 | Well, to be preciser there is a NoInsertAppend method what is said switch off (with false) the default InsertAppend mechanism.
This is the whole object (constructor) I wish to use auto-appending in:
Inswindow::Inswindow(){
CtrlLayout(*this, t_("Add new words"));
ilist.AddColumn(t_("hun")).Edit(es1);
ilist.AddColumn(t_("fin")).Edit(es2);
swapper.WhenPush = THISBACK(Swap);
rdy.WhenPush = THISBACK(Cm);
cancel.WhenPush = Breaker(IDOK);
hufi = 1;
ilist.AppendLine(true);
ilist.DoAppend();
ilist.ShowAppendLine();
}
Of course ilist is an ArrayCtrl. And with the last 3 rows I can get in the new window a row with row cursor active (highlighted). I type the two values in, then hit <Enter> first time - then the highlight disappears, but not any new auto-appended row. If I hit <Enter> once again, then got a newer row.
I suspect non-adequate use rather than a bug, if it is so, you will spot right now.
Miklós
|
DoAppend actually issues appending - it is not "property", but the action. My guess is that this is the problem - your ArrayCtrl is already appending the line when it appears on the screen...
Mirek
|
|
|
Re: About ArrayCtrl options [message #1767 is a reply to message #1762] |
Sat, 18 March 2006 09:18 |
kverko
Messages: 8 Registered: December 2005 Location: Porva, Hungary
|
Promising Member |
|
|
luzr wrote on Sat, 18 March 2006 08:52 |
Inswindow::Inswindow(){
CtrlLayout(*this, t_("Add new words"));
ilist.AddColumn(t_("hun")).Edit(es1);
ilist.AddColumn(t_("fin")).Edit(es2);
swapper.WhenPush = THISBACK(Swap);
rdy.WhenPush = THISBACK(Cm);
cancel.WhenPush = Breaker(IDOK);
hufi = 1;
ilist.AppendLine(true);
ilist.DoAppend();
ilist.ShowAppendLine();
}
Of course ilist is an ArrayCtrl. And with the last 3 rows I can get in the new window a row with row cursor active (highlighted). I type the two values in, then hit <Enter> first time - then the highlight disappears, but not any new auto-appended row. If I hit <Enter> once again, then got a newer row.
DoAppend actually issues appending - it is not "property", but the action. My guess is that this is the problem - your ArrayCtrl is already appending the line when it appears on the screen...
Mirek
|
Of course, DoAppend() is an action according to my design. If I remove it, I get an empty ArrayCtrl in the new window, and can start entering the values from the right-click menu only. But the behavior the same as I have written above: I get a new row after every SECOND <Enter>.
Miklós
|
|
|
|
Re: About ArrayCtrl options [message #1780 is a reply to message #1776] |
Sat, 18 March 2006 19:27 |
kverko
Messages: 8 Registered: December 2005 Location: Porva, Hungary
|
Promising Member |
|
|
Mirek, thank you for the help.
The key was AutoAppending indeed. The missing key. I had to refresh my version because it did not know about AutoAppending yet. And so was I. (I had downloaded the beta about a week before the 602 final was released.)
Miklós
|
|
|
Goto Forum:
Current Time: Mon Jun 10 13:09:32 CEST 2024
Total time taken to generate the page: 0.01517 seconds
|
|
|