Re: EuGrid: How to use onGotFocus for a "cell"? FAO Jonas T.
- Posted by Phil Russell <pg_russell at lineone.net> Feb 23, 2007
- 577 views
Jonas Temple wrote: > > Phil Russell wrote: > > The current version of EuGrid is a bit limited in how it handles messages > > for > > its own child windows (which are non-win32lib). Should be better in version > 2.0 if I ever finish it.</font></i> > > Well, since you're here... > > Phil, what types of incentives would it take to complete V2.0? :) Money, > clothes, > magazine subscriptions? > A combination of the three would probably do it Sorry for the delay. I got it about half done then child#3 arrived and I got assigned to the project from hell at work. The combination of sleep-deprivation and being sick of the sight of a PC at the end of the day has played havoc with my productivity... > I'm working on adding a database file editor to FROG that uses EuGRID. I've > already hacked EuGrid by adding a routine to get the edit control of the > current > cell. I needed to do some specific key handling for numeric fields which > involved > getting the current value of the control. You might also be able to make use of the WM_COMMAND hack that I thought up for Rad. This gives you access to the notification messages sent by a child control. > > So if you need more ideas for V2.0: > * Way to get the value of the current cell, not just the value from the > underlying > dataset. I could send you my change as noted above if that helps. Please. I'll wrap them into another patch release. If it helps, I could make the window handles of the child windows global, which should allow for ease of hacking. > * Mask editing would be REALLY nice. I.E. I set a column/cell property of > say, > EGW_EDIT_MASK and give it '##/##/####' which would obviously imply a date. > * A native Date cell type with multiple formatting options (MDY, YMD, CYMD, > etc.) and link to the Windows date selector. > * A native Time cell type I completely agree. The problem has been that the existing code structure has got so convoluted coping with the additional cell types that it is very hard to add new ones. In the 2.0 design, cell types are separated from the grid code, and act like 'plug-ins'. You will be able to replace or extend the standard cell types, and add new ones, to your heart's content. In addition, I have moved away from hacking at a Windows API level - win32lib is now swish enough for me to use win32lib controls for everything, which should make it a bit easier to follow. So, whilst I can't give you the above cell types now, if you wanted to work on e.g. the masking or date functionality in the meantime, you should be able to port it into a custom cell type plug-in when v2.0 finally hits the streets. > * A message sent when the user pages down and the last row in the grid comes > into focus. The reason is in my database editor I don't load the entire file. > So now I have a check for the pagedown key and then load another page of > records. > The problem is is that I don't know if the last row is displayed. Maybe > there's > another way to accomplish this? Hmm. Should be possible to work out that the last row in the grid is in the target page of records. I would need to output a message before drawing the grid and setting the vertical scrollbar, so that you could add records to the dataset. Would a message like EGW_LAST_PAGE (with maybe EGW_FIRST_PAGE for symmetry) do? > > BTW, I also modified the xControls demo in EuGrid to work with the new version > of xControls. I wanted to make sure they were still compatible. I can send > you the code, if interested. Please. > > Jonas Temple > <a href="http://www.innovativesys.net">http://www.innovativesys.net</a>