Re: [lazarus] anchors to a hidden component
On Tue, 20 Nov 2007 15:55:45 +0100 Giuliano Colla [EMAIL PROTECTED] wrote: Recently the anchors behavior has changed. I have a form with a control anchored to another one. With the latest revisions it happens that when the second control is hidden, the visible one changes its place, inheriting the anchors of the hidden control. Is it an intended change or a bug? Something changed. See http://wiki.lazarus.freepascal.org/Anchor_Sides#Anchoring_to_invisible_controls Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
RE: [lazarus] anchors to a hidden component
Hi Mattias, Will any of this result one day in a fix for this anchor bug? http://www.freepascal.org/mantis/view.php?id=8056 Thanks. -Phil -Original Message- From: Mattias Gaertner [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 20, 2007 2:39 PM To: lazarus@miraclec.com Subject: Re: [lazarus] anchors to a hidden component On Tue, 20 Nov 2007 15:55:45 +0100 Giuliano Colla [EMAIL PROTECTED] wrote: Recently the anchors behavior has changed. I have a form with a control anchored to another one. With the latest revisions it happens that when the second control is hidden, the visible one changes its place, inheriting the anchors of the hidden control. Is it an intended change or a bug? Something changed. See http://wiki.lazarus.freepascal.org/Anchor_Sides#Anchoring_to_invisible_c ontrols Mattias _ 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
Re: [lazarus] anchors to a hidden component
On Tue, 20 Nov 2007 14:56:55 -0500 Hess, Philip J [EMAIL PROTECTED] wrote: Hi Mattias, Will any of this result one day in a fix for this anchor bug? http://www.freepascal.org/mantis/view.php?id=8056 These things are not related. See my notes in the tracker. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] anchors to a hidden component
Mattias Gaertner ha scritto: On Tue, 20 Nov 2007 15:55:45 +0100 Giuliano Colla [EMAIL PROTECTED] wrote: Recently the anchors behavior has changed. I have a form with a control anchored to another one. With the latest revisions it happens that when the second control is hidden, the visible one changes its place, inheriting the anchors of the hidden control. Is it an intended change or a bug? Something changed. See http://wiki.lazarus.freepascal.org/Anchor_Sides#Anchoring_to_invisible_controls Well this has pro's and con's. It can make sense if the control is hidden since the beginning, much less if the control is hidden run-time, because it causes other controls jump around. In my case a label prompts the user to enter something in an edit. The label is anchored to the form, and the edit to the label. When the user enters what requested, the label is hidden, and suddenly the edit jumps to the top of the form! Moreover this inhibits the trick of using a hidden control to perform some special purpose anchoring (e.g. when you need more than 100 pixels, because of layout requirements). I'd be strongly in favor of reconsidering this feature. Giuliano _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] anchors to a hidden component
On Wed, 21 Nov 2007 00:14:30 +0100 Giuliano Colla [EMAIL PROTECTED] wrote: Mattias Gaertner ha scritto: On Tue, 20 Nov 2007 15:55:45 +0100 Giuliano Colla [EMAIL PROTECTED] wrote: Recently the anchors behavior has changed. I have a form with a control anchored to another one. With the latest revisions it happens that when the second control is hidden, the visible one changes its place, inheriting the anchors of the hidden control. Is it an intended change or a bug? Something changed. See http://wiki.lazarus.freepascal.org/Anchor_Sides#Anchoring_to_invisible_controls Well this has pro's and con's. It can make sense if the control is hidden since the beginning, much less if the control is hidden run-time, because it causes other controls jump around. In my case a label prompts the user to enter something in an edit. The label is anchored to the form, and the edit to the label. When the user enters what requested, the label is hidden, and suddenly the edit jumps to the top of the form! Moreover this inhibits the trick of using a hidden control to perform some special purpose anchoring (e.g. when you need more than 100 pixels, because of layout requirements). I'd be strongly in favor of reconsidering this feature. Edit.Top is anchored to Label.Bottom. Label is invisible so the LCL goes to the anchor of Label.Bottom. Probably you did not set a Label.Bottom anchor, so the LCL found a dead end and just did nothing. Now assumes the label.top is anchored to another control A. If A is moved then the Label and Edit should move too. With old behavior the Edit is not moved when the Label is invisible. With new behavior it will move. You can get the old behavior by doing: Edit1.AnchorSide[akTop].Control:=nil; Label1.Visible:=false; Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] anchors to a hidden component
Mattias Gaertner ha scritto: Now assumes the label.top is anchored to another control A. If A is moved then the Label and Edit should move too. With old behavior the Edit is not moved when the Label is invisible. With new behavior it will move. OK. Now I understand the reason for changing. You can get the old behavior by doing: Edit1.AnchorSide[akTop].Control:=nil; Label1.Visible:=false; Thanks Giuliano _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives