BoundLabel disppears

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #37532
    HeDiBo
    Participant

    A component with a bound label set to sclTopLeft will loose the label if the component is aligned alLeft.

    See this project for a sample:

    [attachment=8373:acBoundLabel.zip]

    When the component is aligned alLeft and the BoundLabel is aligned sclLeft, the label's width is honored and it appears.

    So for bound labels aligned sclTopLeft, etc. the label's height should be honored.

    #56868
    Support
    Keymaster

    Hello!

    Please, check attached files, something is wrong there, seems.

    #56869
    HeDiBo
    Participant
    'Support' wrote:

    Hello!

    Please, check attached files, something is wrong there, seems.

    Don't know what happened. This is the correct file:

    [attachment=8375:acBoundLabel.zip]

    #56870
    Support
    Keymaster

    Thank you, I see now.

    I need to think how to implement it, because some difficulties exists.

    For example, if Layout is sclLeftTop and if label aligning is working then it's hard to align a text to the top. The offset property will be ignored in this case.

    I hope you understand what I mean.

    The Offset property must be added to the Label control in this case, many code must be rewritten.

    #56874
    HeDiBo
    Participant
    'Support' wrote:

    Thank you, I see now.

    I need to think how to implement it, because some difficulties exists.

    For example, if Layout is sclLeftTop and if label aligning is working then it's hard to align a text to the top. The offset property will be ignored in this case.

    I hope you understand what I mean.

    The Offset property must be added to the Label control in this case, many code must be rewritten.

    I totally understand. I thought, because when the component is aligned alLeft and the BoundLabel.Layout = sclLeft, the label's width and offset are honored, that BoundLabel.Layout = sclTopLeft would require similar coding. Apparantly it's more complex.

    Is this an idea: All components having a BoundLabel property, are placed inside an invisible but alignable container. That container copies the properties of the original component. Then if the component itself is, say, aligned left, the container is aligned left. If the label has the topleft layout, the component is aligned at the bottom of the container, the label is aligned at the top and the height of the container is the height of the component + the height of the label + the offset. If the label has the sclLeft layout, the component is aligned right in the container and the label is aligned left. The width of the container then is width of label + offset + width of component.

    In other words, alignment, positioning and size are governed by both the component and the label, without the user knowing any of this.

    It is just an idea. May be it's totally foolish and useless.

    #56890
    Support
    Keymaster

    I think, the Padding property may be added in labels (like a padding in CSS – Left, Top, Right and Bottom).

    We will be able to shift a text within the label and label may be aligned in this case…

    #56900
    HeDiBo
    Participant
    'Support' wrote:

    I think, the Padding property may be added in labels (like a padding in CSS – Left, Top, Right and Bottom).

    We will be able to shift a text within the label and label may be aligned in this case…

    With Padding, you mean adding space between the label and the component? Because that's already there (It's called Indent). So, I suppose you mean something else?

    #56901
    Support
    Keymaster

    I mean a space between content of (text) and borders of the control.

    Text will be shifted inside the control if padding is specified.

    #56902
    HeDiBo
    Participant
    'Support' wrote:

    I mean a space between content of (text) and borders of the control.

    Text will be shifted inside the control if padding is specified.

    I understand. You do not mean the distance between the label and the control, but the height of the bounded label itself. Very nice, but you must remember its height. If the label is set to the left of the control and then placed back again at the top it should still use the last height / padding.

    #57145
    HeDiBo
    Participant

    Problem stll exists in 12.18.

    I don't understand the purpose of the extra setting of scLeftLeft.

    It does not solve the problem with Layout = scTopLeft.

    Or maybe I need some clarification.

    #57160
    Support
    Keymaster

    Sorry, big changes and more time needed for implementing of this feature. I hope to do it soon.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.