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++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Ctrl * GetCallbackCtrl()
Re: Ctrl * GetCallbackCtrl() [message #6117 is a reply to message #6113] Tue, 31 October 2006 13:08 Go to previous messageGo to previous message
unodgs is currently offline  unodgs
Messages: 1367
Registered: November 2005
Location: Poland
Ultimate Contributor

luzr wrote on Tue, 31 October 2006 05:34

I think we already have a better option:

Button btn;
btn <<= THISBACK1(Action, line);

void Action(int line)
{
...
}



Line number is unknown until ctrl is clicked...

Quote:



Of course to what degree this is applicable to your problem is debatable (but I think GetCallbackCtrl does not solve this problem as well).

In ArrayCtrl, the issue is solved using ChildGotFocus...

Mirek


ChildGotFocus is not enough. Option, Button, DropList don't get focus when you click on them using left mouse button...
It works fine only for Edit*

Try:

void MakeDropList(One<Ctrl>& ctrl)
{
ctrl.Create<DropList>()
.Add(0, "None")
.Add(1, "Minimal")
.Add(2, "Full");
}

void MakeButton(One<Ctrl>& ctrl)
{
ctrl.Create<Button>();
ctrl->WantFocus();
}

void MakeEdit(One<Ctrl>& ctrl)
{
ctrl.Create<EditString>();
ctrl->WantFocus();
}

arr.AddColumn("1").Ctrls(MakeDropList);
arr.AddColumn("2").Ctrls(MakeButton);
arr.AddColumn("3").Ctrls(MakeEdit);


and click at columns with button or droplist. Cursor wont change its position.
 
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: Debugger error
Next Topic: Copy and Paste changes colors in Icon Edit [BUG]
Goto Forum:
  


Current Time: Sat Aug 16 22:43:34 CEST 2025

Total time taken to generate the page: 0.04310 seconds