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 » About ArrayCtrl options
About ArrayCtrl options [message #423] Mon, 26 December 2005 10:43 Go to next message
kverko is currently offline  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 #424 is a reply to message #423] Mon, 26 December 2005 11:14 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
No such possibility was there.

I have just added AutoAppending option to the ArrayCtrl, it is on uvs2 now...
Re: About ArrayCtrl options [message #1733 is a reply to message #424] Thu, 16 March 2006 19:34 Go to previous messageGo to next message
kverko is currently offline  kverko
Messages: 8
Registered: December 2005
Location: Porva, Hungary
Promising Member
Hi!

After some pause I am handling the newer version with InsertAppend capabilities.
Sorry if I seem to be insatiable, but why have I to hit the <Enter> TWICE to get a new row? Or have I misunderstood something?

Miklós
Re: About ArrayCtrl options [message #1735 is a reply to message #1733] Thu, 16 March 2006 20:18 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kverko wrote on Thu, 16 March 2006 13:34

Hi!

After some pause I am handling the newer version with InsertAppend capabilities.
Sorry if I seem to be insatiable, but why have I to hit the <Enter> TWICE to get a new row? Or have I misunderstood something?

Miklós



I am sorry, there is not "InsertAppend"... Could you give me more hints about what are you doing? (e.g. a couple of lines of code or testcase package)?

Could be a bug... But need a way how to reproduce it.

Mirek
Re: About ArrayCtrl options [message #1741 is a reply to message #1735] Fri, 17 March 2006 07:44 Go to previous messageGo to next message
kverko is currently offline  kverko
Messages: 8
Registered: December 2005
Location: Porva, Hungary
Promising Member
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
Re: About ArrayCtrl options [message #1762 is a reply to message #1741] Sat, 18 March 2006 08:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
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... Wink

Mirek
Re: About ArrayCtrl options [message #1767 is a reply to message #1762] Sat, 18 March 2006 09:18 Go to previous messageGo to next message
kverko is currently offline  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... Wink

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 #1776 is a reply to message #1767] Sat, 18 March 2006 15:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, took a while as I have fixed AppendLine option in the process Smile

#include "ArrayCtrlEdit.h"

GUI_APP_MAIN
{
	Ctrl::SetXPStyle(false);
	EditString es1, es2;
	ArrayCtrl list;
	list.AddColumn(t_("hun")).Edit(es1);
	list.AddColumn(t_("fin")).Edit(es2);
	list.Appending().AppendLine();
	list.AutoAppending();
	list.DoAppend();
	TopWindow win;
	win.Add(list.SizePos());
	win.Run();
	win.Sizeable();
}


I guess key for you here is "AutoAppending".

I am not sure if you in fact want AppendLine - this ads one "odd" line at the end of of list that in fact is not part of list (its position is GetCount()), but can be used to append a line (by pressing the Enter). It is more or less intended to make inserting ortoghonal - without that, you cannot insert the last line, as inserting always takes place before the current line (ok, you can force ArrayCtrl to insert after the current line, but then you cannot insert the firt line..).

Mirek
Re: About ArrayCtrl options [message #1780 is a reply to message #1776] Sat, 18 March 2006 19:27 Go to previous message
kverko is currently offline  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
Previous Topic: ArrayCtrl strange colors in Navigate 602beta3 [BUG][FIXED]-Value problem
Next Topic: ArrayCtrl scroll position [BUG] [FIXED]
Goto Forum:
  


Current Time: Mon Apr 29 14:03:16 CEST 2024

Total time taken to generate the page: 0.02736 seconds