Re: [lazarus] Form.Align without effect
On Sun, 21 Oct 2007 17:50:39 +0200 Thomas Moritz <[EMAIL PROTECTED]> wrote: > Am Sonntag, 21. Oktober 2007 14:10:40 schrieb Mattias Gaertner: > > Hello Mattias, > > > Let the window manager do the maximization. > > Sorry! At my tests, it looks that the MainForm behind the kicker. What do you mean with 'behind the kicker'? > A Statusbar displayed the correct size. Thanks! > > The MainForm must to keep this maximized size oneself. Set Form1.WindowState:=wsMaximized. The window manager will then maximize your application. Even if you resize the screen. > Form1.WindowState:=wsMaximized; // OK > Form1.BorderStyle:=bsSingle; // OK > > but > > Form1.BorderIcons:=[]; > is ignored by gdk. What can i do? It is not ignored by gtk, but by the window manager. For example under ubuntu linux with gtk2 all but the close button is hidden. > procedure TForm1.FormResize(Sender: TObject); > begin > Form1.WindowState:=wsMaximized; > end; > > This isn't a right way, because the screen flickers. I guess TForm1.FormResize is your OnResize event. This means, every time the window is resized, it should maximize. If the window manager does not allow this, this will create an endless loop. No normal application should force maximize. Maybe you are programming a game? Then you might want to try the function of the unit gtkproc: SetWindowFullScreen GrabKeyBoardToForm GrabMouseToForm Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form.Align without effect
Am Sonntag, 21. Oktober 2007 14:10:40 schrieb Mattias Gaertner: Hello Mattias, > Let the window manager do the maximization. Sorry! At my tests, it looks that the MainForm behind the kicker. A Statusbar displayed the correct size. Thanks! The MainForm must to keep this maximized size oneself. Form1.WindowState:=wsMaximized; // OK Form1.BorderStyle:=bsSingle;// OK but Form1.BorderIcons:=[]; is ignored by gdk. What can i do? procedure TForm1.FormResize(Sender: TObject); begin Form1.WindowState:=wsMaximized; end; This isn't a right way, because the screen flickers. Regards Th. Moritz _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form.Align without effect
On Sun, 21 Oct 2007 12:15:40 +0200 "Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote: > On 21/10/2007, Thomas Moritz <[EMAIL PROTECTED]> wrote: > > > > Imho, Delphi set the FormSize to DesktopArea. > > ( ScreenSize - Taskbar ) Sounds like maximizing. > OK, that's clever. Interestingly the Kylix 3 help doesn't mention > anything of that behavior. > > > > > Form1.Height:=Screen.Height-(Screen.Height div 100*8); > > > > It's only good for my own Screen. > > That's true! The other thing that many applications do and that > annoys the crap out of me is that they always assume the taskbar is at > the top or bottom of the screen. > For example, I have a wide screen display. To me it makes more sense > to put the taskbar on the left edge of the screen. It makes it easier > to see the names of running programs in the taskbar. So many > applications start up and are partially hidden behind the taskbar (on > the left of my screen) because they assumed the taskbar is always at > the bottom edge of the screen! Exactly. Let the window manager do the maximization. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form.Align without effect
On 21/10/2007, Thomas Moritz <[EMAIL PROTECTED]> wrote: > > Imho, Delphi set the FormSize to DesktopArea. > ( ScreenSize - Taskbar ) OK, that's clever. Interestingly the Kylix 3 help doesn't mention anything of that behavior. > > Form1.Height:=Screen.Height-(Screen.Height div 100*8); > > It's only good for my own Screen. That's true! The other thing that many applications do and that annoys the crap out of me is that they always assume the taskbar is at the top or bottom of the screen. For example, I have a wide screen display. To me it makes more sense to put the taskbar on the left edge of the screen. It makes it easier to see the names of running programs in the taskbar. So many applications start up and are partially hidden behind the taskbar (on the left of my screen) because they assumed the taskbar is always at the bottom edge of the screen! Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form.Align without effect
Am Sonntag, 21. Oktober 2007 10:53:13 schrieb Graeme Geldenhuys: Hello Graeme, > What should the form align too?? I can understand a component in > a form with Align := alClient (or any other align type), because > it has a parent component to align to. > > What does Delphi do with a Form1.Align := alClient statement? Imho, Delphi set the FormSize to DesktopArea. ( ScreenSize - Taskbar ) My workarround isn't flexible: Form1.Height:=Screen.Height-(Screen.Height div 100*8); It's only good for my own Screen. MfG Th. Moritz _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form.Align without effect
What should the form align too?? I can understand a component in a form with Align := alClient (or any other align type), because it has a parent component to align to. What does Delphi do with a Form1.Align := alClient statement? >From the Kylix 3 help: "TAlign specifies the alignment of a control within its parent. alClient The control resizes to fill the client area of its parent. If another control already occupies part of the client area, the control resizes to fit within the remaining client area. " So that would mean, if a Form doesn't have a parent (isn't embedded in another form or control), it shouldn't do anything. Regards, - Graeme - On 18/10/2007, Thomas Moritz <[EMAIL PROTECTED]> wrote: > This setting: > Form1.Align:=alClient; //or alTop > was ignored. > You can help? Thanks. > > Linux/ FPC 2.2.0 / Lazarus 0.9.23 Beta > > Regards Th. Moritz > _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form.Align without effect
On Thu, 18 Oct 2007 09:59:48 +0200 Thomas Moritz <[EMAIL PROTECTED]> wrote: > This setting: > Form1.Align:=alClient; //or alTop > was ignored. > You can help? Thanks. > > Linux/ FPC 2.2.0 / Lazarus 0.9.23 Beta Can you provide a complete example? Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Form.Align without effect
Thomas Moritz schrieb: This setting: Form1.Align:=alClient; //or alTop was ignored. You can help? Thanks. If Form has an parent this works for me. Linux/ FPC 2.2.0 / Lazarus 0.9.23 Beta Regards Th. Moritz _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Form.Align without effect
This setting: Form1.Align:=alClient; //or alTop was ignored. You can help? Thanks. Linux/ FPC 2.2.0 / Lazarus 0.9.23 Beta Regards Th. Moritz _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives