Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-09

New component TMCalEdit

6 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tony Maro
to Andrew Johnson: On Mon, 09 Sep 2002 10:18:36 +0200 It CAN be implemented, to a degree, but as you say…
Andrew Johnson wrote 12 lines
Usually for a control like this calendar, the excepted way on Windows is to make a borderless stay on top window for the Calendar itself(like Combobox drop down etc.), and using GDK Popup Window is almost the same, as this is what is used for Combobox's and Menu's etc internally in GTK. Using the set Parent Window routines etc, it is possible to make a form always stay on top of its parent window as well, and eventually I may try to do this to try and make a fsStayOnTop where a form will always try and stay on top of the other forms within an Application Hierarchy. If we were to do this, and state that when fsStayOnTop and bsNone then use GDKPopup, we might be able to fake this behaviour most of the time...

Well, with the fix of the lost focus event in Lazarus, the point is moot as far as this control goes anyway - I've changed my code appropriately where it now closes itself if it loses focus, which was the plan originally. My fsstayontop and modal attempts were attempts at workarounds for the event not firing.

Since that now works I've removed the close button and shrunk the whole calendar a bit. New code at same location. Now I'm on to the next bit...

However, I can still see dire need soon for a form that will at least stay on top of it's parent form. Even a modal form didn't do that...

-Tony

Reply by email

Florian Klaempfl
to Tony Maro
you wrote 7 lines
Hehe... I just realized there's no TStringGrid yet! That kind of puts a damper on what I am developing... LOL

So you know what you've to develop now ;)

I don't even see it in the FPC CVS. Just a few placeholders.

Reply by email

Andrew Johnson
Show quoted text 5 lines
The fsStayOnTop cannot be implemented in Linux, as the window manager philosophy is quite different from Windows (and I am thankful for that). User may choose what window stays on top, not appliaction, and I like it. But maybe I am wrong and it can be done, you never know.

It CAN be implemented, to a degree, but as you say there is a difference of philosophy. Theoretically calling X directly you could create a close aproximation of it, but in GTK there are only three modes : Normal, Dialog, and Popup:

Normal is essentially an fsNormal and bsSingle or bsSizeable Dialog is like fsNormal and bsDialog
Popup is like fsStayOnTop and bsNone

Usually for a control like this calendar, the excepted way on Windows is to make a borderless stay on top window for the Calendar itself(like Combobox drop down etc.), and using GDK Popup Window is almost the same, as this is what is used for Combobox's and Menu's etc internally in GTK.

Using the set Parent Window routines etc, it is possible to make a form always stay on top of its parent window as well, and eventually I may try to do this to try and make a fsStayOnTop where a form will always try and stay on top of the other forms within an Application Hierarchy. If we were to do this, and state that when fsStayOnTop and bsNone then use GDKPopup, we might be able to fake this behaviour most of the time...

Andrew

_________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com

Reply by email

Michal Bukovjan
to Tony Maro: Well, with the fix of the lost focus event in Lazarus, the point is moot as far as this…
Florian Klaempfl wrote 17 lines
At 10:03 09.09.2002 -0400, you wrote: > Hehe... > > I just realized there's no TStringGrid yet! > > That kind of puts a damper on what I am developing... > > LOL So you know what you've to develop now ;) > I don't even see it in the FPC CVS. Just a few placeholders.

Since we have quite a few WinAPI calls in place, a good approach to this problem would be to look for some free and open source grid reimplementation, ask author permition, and try to use it (just like we do with TSynEdit).

This would be worth a try, IMHO.

Michal

Reply by email