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 » U++ Widgets - General questions or Mixed problems » Ctrl::Accept
Ctrl::Accept [message #9505] Sat, 12 May 2007 22:41 Go to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

I wonder if it wouldn't be better if Ctrl::Accept checked value of child control if it is visible only. Now it checks any child control no matter what its state is.

For exeample in GridCtrl if user ends row editing all child edit controls are hidden (not detached from parent) and for some of them checking their values during closing dialog the grid belongs to is not correct especialy if edit is custom control with its own Accept (which returns correct value in grid scope).

Anyway my question is if Accept should check values of all child controls? Is this property used in any application? Of course I can overload GridCtrl Accept but maybe change in Ctrl::Accept is more appropriate.
Re: Ctrl::Accept [message #9507 is a reply to message #9505] Sun, 13 May 2007 00:40 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
Well, I think it is quite good *default* behaviour - this is what I expect unless I need something really special.

Note e.g. that in TabCtrl, tabs switching is implemented by hiding/showing children widgets...
Re: Ctrl::Accept [message #9509 is a reply to message #9507] Sun, 13 May 2007 08:02 Go to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

You're right. And even if loop for child controls do not check visibility the first line of ctrl::accept does it. I somehow missed that... The correct solution is to add such check in overloaded Accept in my own control.
Previous Topic: struct name##__layid {};
Next Topic: How to arrange widgets
Goto Forum:
  


Current Time: Sun Jun 09 18:02:18 CEST 2024

Total time taken to generate the page: 0.02076 seconds