Re: [lazarus] alignment issues.

2006-05-09 Thread Borut Maricic
I just also want to say "Thank you!" for that nice explanation and the change of code. Borut On 2006-05-08 at 12:25, Mattias Gaertner ([EMAIL PROTECTED]) wrote: > Long answer: > The Align property is difficult. [...] _ To uns

Re: [lazarus] alignment issues.

2006-05-08 Thread Mattias Gaertner
On Mon, 8 May 2006 14:18:27 +0300 "Alexander Todorov" <[EMAIL PROTECTED]> wrote: > On 5/8/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote: > > Short answer: Bug. Fixed. > > Thank you for this explanation of LCL internals. > Should I close issue #0002063 regarding this bug and paste your e-mail > f

Re: [lazarus] alignment issues.

2006-05-08 Thread Alexander Todorov
On 5/8/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote: Short answer: Bug. Fixed. Thank you for this explanation of LCL internals. Should I close issue #0002063 regarding this bug and paste your e-mail for reference? _ To unsub

Re: [lazarus] alignment issues.

2006-05-08 Thread Mattias Gaertner
On Fri, 5 May 2006 16:28:26 +0300 "Geno Roupsky" <[EMAIL PROTECTED]> wrote: > A found that is all depends of weather the parent will be the form or a > panel. Creating a new form, droping a panel in it and with this code for > Form.OnCreate > > procedure TForm1.FormCreate(Sender: TObject); > begi

Re: [lazarus] alignment issues.

2006-05-08 Thread Mattias Gaertner
On Fri, 5 May 2006 09:20:48 +0200 "Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote: > Okay, I miss understood the question. I was looking at the Edit and > alClient and seeing that the Edit didn't align the complete form area. > Never looked at the button order. > > Anyway, I agree one would expec

Re: [lazarus] alignment issues.

2006-05-08 Thread Mattias Gaertner
On Thu, 4 May 2006 22:48:24 +0200 Borut Maricic <[EMAIL PROTECTED]> wrote: > On 2006-05-04 at 18:30, > Graeme Geldenhuys ([EMAIL PROTECTED]) wrote: > > > You never showed the code for Panel1...? How big is Panel1? > > Also it isn't a good idea to declare f1, f2 and E as local variables > > in Fo

Re: [lazarus] alignment issues.

2006-05-05 Thread Alexander Todorov
I have submited a bug report with a slightly complicated example. (see screenshots) http://www.lazarus.freepascal.org/mantis/view.php?id=2063 Another interesting thing is that Kylix 3 produces the same results when code is executed in OnFormCreate and OnButtonClick. The resulting order is 2-1 fo

Re: [lazarus] alignment issues.

2006-05-05 Thread Graeme Geldenhuys
On 05/05/06, Geno Roupsky <[EMAIL PROTECTED]> wrote: Based on that I think it has samething to do with the panel not yet shown or not entirely initialized. I think you are on to something. I move that code to the OnShow event and it worked perfectly. Both sets of buttons are in the 2-1 order.

Re: [lazarus] alignment issues.

2006-05-05 Thread Geno Roupsky
A found that is all depends of weather the parent will be the form or a panel. Creating a new form, droping a panel in it and with this code for Form.OnCreateprocedure TForm1.FormCreate(Sender: TObject);begin   with TButton.Create(Panel1) do  begin    Align := alRight;    Caption := '1';    Parent

Re: [lazarus] alignment issues.

2006-05-05 Thread Giuliano Colla
Alexander Todorov ha scritto: [...] After all these e-mails I did not understand one thing. Is the buttons order 1-2 correct? Should the second button be aligned to the rightmost or it should stick next to the first button getting the expected order 2-1? Is this a bug or something that is relate

Re: [lazarus] alignment issues.

2006-05-05 Thread Graeme Geldenhuys
Tested on Linux and Windows XP with Lazarus 0.9.14, and on Windows XP with Delphi 7. The screenshot was from the Delphi project. That is really weird? After all these e-mails I did not understand one thing. Is the buttons order 1-2 correct? As far as I know, the order should have been 2-1.

Re: [lazarus] alignment issues.

2006-05-05 Thread Alexander Todorov
On 5/5/06, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: On 05/05/06, Borut Maricic <[EMAIL PROTECTED]> wrote: > Yes, and this is not logical and is exactly the opposite of the way Delphi > ever did it. Moreover, it works inconsistently when you mix component > types, what Alex has clearly demonst

Re: [lazarus] alignment issues.

2006-05-05 Thread Graeme Geldenhuys
On 05/05/06, Micha Nelissen <[EMAIL PROTECTED]> wrote: Ok now I'm confused. The various screenshots seem to contradict one another. I've always hated this align property exactly because of this ambiguity. I think I've always kept things simple by having only one control with a certain Align, and

Re: [lazarus] alignment issues.

2006-05-05 Thread Borut Maricic
> I tested this under Windows and that is indeed what I get. Both under > Lazarus and Delphi 7. See attached screenshots. I am using Lazarus > 0.9.15 (rev 9158) on Windows 2000. Thank you for your time Graeme. Now, I tested Lazarus (the SVN from yesterday evening) under WinXP and did not get the

Re: [lazarus] alignment issues.

2006-05-05 Thread Micha Nelissen
Graeme Geldenhuys wrote: Nope, it shouldn't! They should stack against each other in the order you did the Align. The first control that was set to alRight must be the right most control in the end. Ok now I'm confused. The various screenshots seem to contradict one another. I've always hate

Re: [lazarus] alignment issues.

2006-05-05 Thread Graeme Geldenhuys
On 05/05/06, Borut Maricic <[EMAIL PROTECTED]> wrote: Yes, and this is not logical and is exactly the opposite of the way Delphi ever did it. Moreover, it works inconsistently when you mix component types, what Alex has clearly demonstrated. So, this is an issue, is it not? What platform and to

Re: [lazarus] alignment issues.

2006-05-05 Thread Graeme Geldenhuys
On 05/05/06, Micha Nelissen <[EMAIL PROTECTED]> wrote: The control that you align to the right last, will be in the rightmost position. Nope, it shouldn't! They should stack against each other in the order you did the Align. The first control that was set to alRight must be the right most co

Re: [lazarus] alignment issues.

2006-05-05 Thread Borut Maricic
> Ehm, doesn't your description match the picture ? Ehm, wouldn’t it be easier to assume that Alex knows very well what should and is going on with such a simple example, but has a bit of a problem expressing himself clearly in English (don’t most of us have such problems)? > The control that yo

Re: [lazarus] alignment issues.

2006-05-05 Thread Graeme Geldenhuys
Okay, I miss understood the question. I was looking at the Edit and alClient and seeing that the Edit didn't align the complete form area. Never looked at the button order. Anyway, I agree one would expect the button order to be 2 1 I tested this under Windows and that is indeed what I get. Bo

Re: [lazarus] alignment issues.

2006-05-04 Thread Micha Nelissen
Alexander Todorov wrote: I assumed that button f1 will be aligned to the right, button f2 will be aligned to the right, next to the f1, and the edit box will fill the remaining space. Ehm, doesn't your description match the picture ? The control that you align to the right last, will be in the

Re: [lazarus] alignment issues.

2006-05-04 Thread Alexander Todorov
On 5/4/06, Borut Maricic <[EMAIL PROTECTED]> With all due respect, what Todorov has made was - IMHO - an example that was recreating an issue. That's right. So, the original question is grounded and I will just restate it here: The code sequence f1 := TButton.Create(Form1); with f1 do begi

Re: [lazarus] alignment issues.

2006-05-04 Thread Borut Maricic
On 2006-05-04 at 18:30, Graeme Geldenhuys ([EMAIL PROTECTED]) wrote: > You never showed the code for Panel1...? How big is Panel1? > Also it isn't a good idea to declare f1, f2 and E as local variables > in FormCreate. You will never be able to reference it again I just happened to browse t

Re: [lazarus] alignment issues.

2006-05-04 Thread Graeme Geldenhuys
You never showed the code for Panel1...? How big is Panel1? Also it isn't a good idea to declare f1, f2 and E as local variables in FormCreate. You will never be able to reference it again Regards, - Graeme - On 04/05/06, Alexander Todorov <[EMAIL PROTECTED]> wrote: Hello, what do you

[lazarus] alignment issues.

2006-05-04 Thread Alexander Todorov
Hello, what do you expect to be the result from the following code : procedure TForm1.FormCreate(Sender: TObject); var f1, f2 : TButton; E : TEdit; begin f1 := TButton.Create(Panel1); with f1 do begin Parent := Panel1; Align := alRight; Caption := '1'; end; f2