Sign in Join

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

Mailing lists / lazarus / 2003-12

can not resize form

12 messages · 6 people ·

Reply by email Subscribe to this list Your subscription

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

LeVA

Hello!

I have a form called Form1, and it has a Button, which has these actions:

Form1.Width := 518;
Form1.Height := 536;

In Kylix and Delphi these variables controls the size of the form. In lazarus, these variables doesn't do anything (for me?). When I start the compiled application, and push the button, it doesn't resize the form. If I compile the same code in kylix, it does the resizing. I'm using the latest cvs version of lazarus. I've fetched, and compiled it today. Is this a missing feature, or there is another way in lazarus to resize forms?

Thanks!

Daniel

LeVA

Reply by email

Ken Moffat
to LeVA
LeVA wrote 9 lines
Hello! I have a form called Form1, and it has a Button, which has these actions: Form1.Width := 518; Form1.Height := 536; In Kylix and Delphi these variables controls the size of the form. In lazarus, these variables doesn't do anything (for me?).

This code works fine here on Lazarus. Is this the only test you've done?

Ken

Reply by email

Eric Chapman
to LeVA: Ken Moffat �rta: It is only working, when the Form's Borderstyle is set to…
Show quoted text 5 lines
And allow me to merge another problem. When I'm using the BitButton, or the TIMAGE, lazarus can not display the given bmp file correctly. It only puts some colour lines, and a thick black line instead of displaying the bmp. I tried to convert the bitmap to greyscale, but no success. I get these messages in my console, when adding bmp files:

I raised this as a bug on the Lazarus website. Since then I have discovered that images are displayed correctly on a BitButton if they are in XPixmap (.xpm) format.

Eric

Reply by email

LeVA
to LeVA: Hello! I have a form called Form1, and it has a Button, which has these actions:…

Ken Moffat �rta:

Show quoted text 16 lines
LeVA wrote: > Hello! > > I have a form called Form1, and it has a Button, which has these actions: > > Form1.Width := 518; > Form1.Height := 536; > > In Kylix and Delphi these variables controls the size of the form. In > lazarus, these variables doesn't do anything (for me?). This code works fine here on Lazarus. Is this the only test you've done?

It is only working, when the Form's Borderstyle is set to 'bstoolwindow'. Then the resizing works, and I get the expected result. If the Borderstyle is set to something other than 'bstoolwindow', then the Form1.width/height, do not working.

And allow me to merge another problem. When I'm using the BitButton, or the TIMAGE, lazarus can not display the given bmp file correctly. It only puts some colour lines, and a thick black line instead of displaying the bmp. I tried to convert the bitmap to greyscale, but no success. I get these messages in my console, when adding bmp files:

Warning: [TgtkObject.CreateBitmap] No visual for depth 8. Using default.

I get this message when I'm opening a greyscaled bitmap file too.

Is it possible that this bmp problem, and above resizing problem is caused by my old (1.2.10-11) gtk libs?

Thanks!

Daniel

LeVA

Reply by email

Andrew Higgs
to LeVA: Hello! I have a form called Form1, and it has a Button, which has these actions:…

Is this not something to do with the window manager?

I have a resize problem with some of the Lazarus forms when using OpenBox2.

Kind regards
Andrew Higgs

Ken Moffat wrote 16 lines
LeVA wrote: > Hello! > > I have a form called Form1, and it has a Button, which has these actions: > > Form1.Width := 518; > Form1.Height := 536; > > In Kylix and Delphi these variables controls the size of the form. In > lazarus, these variables doesn't do anything (for me?). This code works fine here on Lazarus. Is this the only test you've done?

Reply by email

Mattias Gaertner
to LeVA: Hello! I have a form called Form1, and it has a Button, which has these actions:…
Show quoted text 9 lines
And allow me to merge another problem. When I'm using the BitButton, or the TIMAGE, lazarus can not display the given bmp file correctly. It only puts some colour lines, and a thick black line instead of displaying the bmp. I tried to convert the bitmap to greyscale, but no success. I get these messages in my console, when adding bmp files: Warning: [TgtkObject.CreateBitmap] No visual for depth 8. Using default. I get this message when I'm opening a greyscaled bitmap file too.

The old bitmap loading code is buggy.

The new fpImage code works better, although not for 8bit color depths. As soon as the official compiler for lazarus becomes fpc 1.9 or 2.0, fpImage will be activated as default. At the moment to activate it, you must compile the LCL with -dUseFPImage.

Mattias

Reply by email

Mattias Gaertner
to LeVA: Hello! I have a form called Form1, and it has a Button, which has these actions:…
Show quoted text 28 lines
Mattias Gaertner �rta: > On Mon, 15 Dec 2003 15:49:12 +0100 LeVA wrote: > > >>And allow me to merge another problem. When I'm using the BitButton, or >>the TIMAGE, lazarus can not display the given bmp file correctly. It >>only puts some colour lines, and a thick black line instead of >>displaying the bmp. I tried to convert the bitmap to greyscale, but no >>success. I get these messages in my console, when adding bmp files: >> >>Warning: [TgtkObject.CreateBitmap] No visual for depth 8. Using default. >> >>I get this message when I'm opening a greyscaled bitmap file too. > > > The old bitmap loading code is buggy. > > The new fpImage code works better, although not for 8bit color depths. > As soon as the official compiler for lazarus becomes fpc 1.9 or 2.0, > fpImage will be activated as default. At the moment to activate it, you > must compile the LCL with -dUseFPImage. > > > Mattias Could you tell me how to do this exactly? How to compile the LCL with the -dUseFPImage option? I'm compiling lazarus with cd lazarus; make. Where should I put that option?

Either in the configure Build Lazarus dialog or at command line

cd lazarus; make clean all OPT='-dUseFPImage'

Mattias

Reply by email

LeVA
to LeVA: Hello! I have a form called Form1, and it has a Button, which has these actions:…

Mattias Gaertner �rta:

Show quoted text 23 lines
On Mon, 15 Dec 2003 15:49:12 +0100 LeVA wrote: >And allow me to merge another problem. When I'm using the BitButton, or >the TIMAGE, lazarus can not display the given bmp file correctly. It >only puts some colour lines, and a thick black line instead of >displaying the bmp. I tried to convert the bitmap to greyscale, but no >success. I get these messages in my console, when adding bmp files: > >Warning: [TgtkObject.CreateBitmap] No visual for depth 8. Using default. > >I get this message when I'm opening a greyscaled bitmap file too. The old bitmap loading code is buggy. The new fpImage code works better, although not for 8bit color depths. As soon as the official compiler for lazarus becomes fpc 1.9 or 2.0, fpImage will be activated as default. At the moment to activate it, you must compile the LCL with -dUseFPImage. Mattias

Could you tell me how to do this exactly? How to compile the LCL with the -dUseFPImage option? I'm compiling lazarus with cd lazarus; make. Where should I put that option?

Thanks!

LeVA

Reply by email

Mattias Gaertner
to LeVA: Hello! I have a form called Form1, and it has a Button, which has these actions:…
Show quoted text 40 lines
Micha Nelissen �rta: > LeVA wrote: > >>> The old bitmap loading code is buggy. >>> >>> The new fpImage code works better, although not for 8bit color >>> depths. As >>> soon as the official compiler for lazarus becomes fpc 1.9 or 2.0, >>> fpImage >>> will be activated as default. At the moment to activate it, you must >>> compile >>> the LCL with -dUseFPImage. >>> >>> >>> Mattias >> >> >> >> Could you tell me how to do this exactly? How to compile the LCL with >> the -dUseFPImage option? I'm compiling lazarus with cd lazarus; make. >> Where should I put that option? > > > make OPT="-dUseFPImage" clean all > > 'clean' removes output files like *.o etc. > > HTH, > > Micha. After typing: cd lazarus; make clean; make OPT="-dUseFPImage" I get this error message: Compiling intfgraphics.pas intfgraphics.pas(34,29) Fatal: Can't find unit FPIMAGE make[1]: *** [alllclunits.ppu] Error 1 make[1]: Leaving directory `/home/leva/FreePascal/lazarus/lcl' make: *** [lcl] Error 2 Is there anything that I need to download before using this feature?

A current fpc (1.9 or 1.0.11). That's why it is not activated as default.

Mattias

Reply by email

LeVA
to LeVA: Hello! I have a form called Form1, and it has a Button, which has these actions:…

Micha Nelissen �rta:

Show quoted text 29 lines
LeVA wrote: >> The old bitmap loading code is buggy. >> >> The new fpImage code works better, although not for 8bit color >> depths. As >> soon as the official compiler for lazarus becomes fpc 1.9 or 2.0, >> fpImage >> will be activated as default. At the moment to activate it, you must >> compile >> the LCL with -dUseFPImage. >> >> >> Mattias > > > > Could you tell me how to do this exactly? How to compile the LCL with > the -dUseFPImage option? I'm compiling lazarus with cd lazarus; make. > Where should I put that option? make OPT="-dUseFPImage" clean all 'clean' removes output files like *.o etc. HTH, Micha.

After typing: cd lazarus; make clean; make OPT="-dUseFPImage" I get this error message:
Compiling intfgraphics.pas
intfgraphics.pas(34,29) Fatal: Can't find unit FPIMAGE make[1]: *** [alllclunits.ppu] Error 1
make[1]: Leaving directory `/home/leva/FreePascal/lazarus/lcl' make: *** [lcl] Error 2

Is there anything that I need to download before using this feature?

Thanks!

LeVA

Reply by email

Micha Nelissen
to LeVA: Hello! I have a form called Form1, and it has a Button, which has these actions:…
LeVA wrote 15 lines
> The old bitmap loading code is buggy. > > The new fpImage code works better, although not for 8bit color depths. As > soon as the official compiler for lazarus becomes fpc 1.9 or 2.0, fpImage > will be activated as default. At the moment to activate it, you must > compile > the LCL with -dUseFPImage. > > > Mattias Could you tell me how to do this exactly? How to compile the LCL with the -dUseFPImage option? I'm compiling lazarus with cd lazarus; make. Where should I put that option?

make OPT="-dUseFPImage" clean all

'clean' removes output files like *.o etc.

HTH,

Micha.

Reply by email