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 » first row strange behaviour
first row strange behaviour [message #4048] Tue, 18 July 2006 12:55 Go to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I've an ArrayCtrl with an editint ctrl in column 4 build with
...
	arrp.AddColumn("Edit", t_("code"), 4).Ctrls(EditResult);  
...
void EditResult(One<Ctrl>& ctrl)
{
	ctrl.Create<EditInt>().MaxChars(1);
}


When I click on any row (not directly in the EditInt) the focus goes immediately in the EditInt ctrl. This is what I desire. So that I can intercept the keys of the keyboard and process the user input.
But when the very first click on the array begin with the row 0, the focus doesn't go in the EditInt. See picture:
index.php?t=getfile&id=186&private=0
To do it first I need to click some other row and then come back to the row 0.
Is this normal?

Why do not click directly inside the EditInt of row 0? Because I'm going to hide that column and the user is not aware of its presence. The EditInt is used only to get the input from the keyboard when the user has clicked a row of the arrayctrl.
Thank you,

Luigi
  • Attachment: v50_12.jpg
    (Size: 20.87KB, Downloaded 2044 times)

[Updated on: Tue, 18 July 2006 14:16]

Report message to a moderator

Re: first row strange behaviour [message #4863 is a reply to message #4048] Wed, 23 August 2006 19:35 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I am sorry, I somehow missed this message... Is it resolved now?

Mirek
Re: first row strange behaviour [message #4876 is a reply to message #4863] Wed, 23 August 2006 22:14 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
luzr wrote on Wed, 23 August 2006 19:35

I am sorry, I somehow missed this message... Is it resolved now?

Mirek


Unfortunately not yet, even 608-dev1 shows the same problem: the focus of row 0 doesn't go in the editctrl.

Luigi
Re: first row strange behaviour [message #4903 is a reply to message #4876] Thu, 24 August 2006 18:33 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
#include <CtrlLib/CtrlLib.h>

GUI_APP_MAIN
{
	ArrayCtrl a;
	a.AddColumn("1");
	a.AddColumn("2").Ctrls<EditDate>();
	
	for(int i = 0; i < 300; i++)
		a.Add(i, GetSysDate() + i);

	TopWindow win;
	win.Sizeable();
	win.Add(a.SizePos());
	win.Run();
}


seems to work OK...

Mirek
Re: first row strange behaviour [message #4906 is a reply to message #4903] Thu, 24 August 2006 20:04 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
luzr wrote on Thu, 24 August 2006 18:33

...
seems to work OK...

Mirek

But this doesn't work:

#include <CtrlLib/CtrlLib.h>

GUI_APP_MAIN
{
	ArrayCtrl a;
	a.AddColumn("1");
	a.AddColumn("2").Ctrls<EditInt>();
	
	for(int i = 0; i < 300; i++) a.Add(i, i);
   
        a.GoBegin(); // <<<<< without works
    
        TopWindow win;
	win.Sizeable();
	win.Add(a.SizePos());
	win.Run();
}

The problem is the method GoBegin(). I need it because in my app the cursor is at the end of the array.

Luigi
Re: first row strange behaviour [message #4907 is a reply to message #4906] Thu, 24 August 2006 21:10 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
The trouble here is that no window is opened at the "GoBegin" time.

This again works:

#include <CtrlLib/CtrlLib.h>

GUI_APP_MAIN
{
	ArrayCtrl a;
	a.AddColumn("1");
	a.AddColumn("2").Ctrls<EditDate>();
	
	for(int i = 0; i < 300; i++)
		a.Add(i, GetSysDate() + i);

	TopWindow win;
	win.Sizeable();
	win.Add(a.SizePos());
	win.Open();
	a.GoBegin();
	win.Run();
}


Anyway, I will try to fix it to work even in the "unopened" mode.

Mirek
Re: first row strange behaviour [message #4908 is a reply to message #4907] Thu, 24 August 2006 21:45 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Hopefuly fixed.

Mirek
Re: first row strange behaviour [message #5021 is a reply to message #4908] Thu, 31 August 2006 00:16 Go to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
luzr wrote on Thu, 24 August 2006 21:45

Hopefuly fixed.

Mirek


With 608-dev2 the problem disappeared.
Thanks.
Luigi
Previous Topic: About GetClickRow() and GetCursor()
Next Topic: How set read-only state to a editable column?
Goto Forum:
  


Current Time: Sun Apr 28 20:57:18 CEST 2024

Total time taken to generate the page: 0.03972 seconds