[lazarus] OnExit event...

Andrew Johnson aj_genius at hotmail.com
Sun Sep 29 19:21:43 EDT 2002


On Sun, 29 Sep 2002 17:03:04 -0500
"Tony Maro" <TonyM at nlisc.com> wrote :

>In my attempts to work around some of the modal issues

Which modal issues? The Close one? or are there other problems you didn't 
post? If so..well, do so.. they can't be fixed if they aren't known about.

>and such here's what I've tried and run into:

>I've added a property to the TMCalEdit control called "ShowAsPanel" that 
>instead of popping up a window will actually create a panel on >the form 
>that houses the edit box, just under the edit box.

hrmm.. hope you realize the problems this can introduce with auto 
Size/scroll'ing, on smaller screen resolutions, edge of screen , beyond 
screen etc..

>I've tried handling the OnExit event for the calendar control, but one of 
>two things happens.

>If I create and show the panel and calender, then call setfocus on the 
>calendar, it instantly fires the onexit event.

the event on the panel, or on the Calendar?

>If I create and show the panel and calendar, and DONT call setfocus, it 
>never fires the onexit event.  I have no way of tracking when a user clicks 
>out of the TCalendar component.

Well.. not to beat this issue to the ground, but AFAIK none the 
focus/non-focus events, tabbing or losefocus/gain focus work quite right, 
because focusing is handled in a method very different in GTK then in Win32, 
so until focusing/tabbing events and functions are handled mostly by the LCL 
or interface, things will work inccorectly. To this end I have gotten the 
GTK+/Gnome App. Dev. Book to try and learn about Signal vs Callbacks, 
focusing tabbing et all, along with of course having a more comprehensive 
source than simply reading GTK source code, or incomplete API's(the tutorial 
is mostly useless in the areas I know nothing about..)

>Any ideas?  If you guys need deeper info I can post the app, but it's 
>getting pretty big...

No not really.. except for the above. I don't really need to see the app. I 
think I know what you mean, and I can look into, but.... well anyway I don't 
want to rehash all the problems inherent in doing things the Win32 way in a 
GTK evironment, but suffice it to say while on enter/exit events do exist in 
GTK, they do not work exactly the same way as you would expect from a Win32, 
or even a QT design.. aka Delphi/Kylix. I will see what I can dredge up but 
this is not an area I am all that well informed on in GTK or Win32, as it is 
not something I have ever really used on an API level.. only Delphi, which 
is the problem with relying to much on platform specific RAD'S..

Andrew

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com






More information about the Lazarus mailing list