none
Grid column margins RRS feed

  • Question

  • Hello:

    It seems that grid column margins are a problem. I have set the column text box margin to 6 (and the column Sparse to F), but then, the text in the column is in position 'bottom', and I cannot change that (I have tried Top and Middle).

    What can I do?

    Thanks, Hans L

    Wednesday, June 15, 2011 9:23 PM

Answers

  • Hi Hans,

    your textbox will be positioned 6 px lower than usual and with a default grid.rowheight of 18, this will be the bottom of your cell.

    You should change the grids rowheight value to  30 or higher. Then your textbox will appear the way you want it to.


    Gruss / Best regards -Tom 010101100100011001010000011110000101001001101111011000110110101101110011
    Thursday, June 16, 2011 5:38 AM
    Moderator
  • Hi Hans,

    I wouldn't call it a glitch. It simply is a property that defines the upper, lower, left and right margin of text within a textbox object.

    You can try this by creating a textbox with Width=100,Height=100,Margin=15,Alignment=1

    What makes it a bit getting used to in a grid is, that the positioning of the textbox itself depends on the columns alignment property and IMHO you often will have to check that both properties are congruent.

    And ... the row height must apply, too. So it definitely is a bit tricky...


    Gruss / Best regards -Tom 010101100100011001010000011110000101001001101111011000110110101101110011
    Friday, June 17, 2011 5:46 AM
    Moderator

All replies

  • Hi Hans,

    your textbox will be positioned 6 px lower than usual and with a default grid.rowheight of 18, this will be the bottom of your cell.

    You should change the grids rowheight value to  30 or higher. Then your textbox will appear the way you want it to.


    Gruss / Best regards -Tom 010101100100011001010000011110000101001001101111011000110110101101110011
    Thursday, June 16, 2011 5:38 AM
    Moderator
  • Thank you, Tom. It works fine.

    Now, do you know why the text box lowers when you set its *horizontal* margin larger? Is it a glitch?

    Hans L

    Thursday, June 16, 2011 1:54 PM
  • Hi Hans,

    I wouldn't call it a glitch. It simply is a property that defines the upper, lower, left and right margin of text within a textbox object.

    You can try this by creating a textbox with Width=100,Height=100,Margin=15,Alignment=1

    What makes it a bit getting used to in a grid is, that the positioning of the textbox itself depends on the columns alignment property and IMHO you often will have to check that both properties are congruent.

    And ... the row height must apply, too. So it definitely is a bit tricky...


    Gruss / Best regards -Tom 010101100100011001010000011110000101001001101111011000110110101101110011
    Friday, June 17, 2011 5:46 AM
    Moderator
  • Well, Tom, if the margin is, as you say, "upper, lower, left and right margin of text within a textbox object.", then I do understand. And I guess that the top margin take precedent over the lower margin, since the text "sinks". (It would have made more sense to have the text centered vertically when the column heights is not enough to accommodate both the text height and the margins, since the top and bottom margins are the same.)

    Regards,

    Hans L

    Friday, June 17, 2011 2:17 PM