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 » DropGrid improvement proposals
Re: DropGrid improvement proposals [message #31880 is a reply to message #31879] Mon, 04 April 2011 12:49 Go to previous messageGo to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

koldo wrote on Mon, 04 April 2011 05:34

Hello Daniel

I like DropGrid control. To make it a little more standard I propose you a couple of changes in DropGrid.cpp:

- Now if control is not editable, it appears with white background as editable
To fix it the change would be:

void DropGrid::Paint(Draw& w)
...
Color bg = !IsEnabled() || !IsEditable() ? ... // Added || !IsEditable()

- When doing a SetData(Null) or just clearing the value in ClearValue() or DoClearValue(), SetFocus() is called Smile.
As in my program a WhenAction function in an EditString is calling droplist.SetData(Null), the EditString loses the focus Smile. However when inserting non Null data, focus is not lost. Smile
To fix it just remove SetFocus() in both methods.


I would like to get a derived DropGrid control but editable at the same time that drop list is shown. Where in the code drop list is cleared when control loses the focus?

You're right. Calling SetFocus is a mistake and this should be fixed. I only wonder why I did this Smile. I'll check it in the evening.
 
Read Message
Read Message
Read Message
Previous Topic: GridCtrl questions
Next Topic: FIX: ArrayCtrl to support Style
Goto Forum:
  


Current Time: Thu May 09 14:52:28 CEST 2024

Total time taken to generate the page: 0.01359 seconds