Hi,
I have an issue with the padding of cell content in my UltraWinGrid. Depending on their type (numeric or text), the padding is different.
I attached a screenshot showing the issue. Note that the issue is still present if both content are aligned on the same side.
tfresnea said:On the screenshot I attached, the first column is aligned on the right, the second column is aligned on the left. I assumed that the right padding for the first column would have been the same as for the left padding of the second column. But maybe this is normal, or this is defined by a property I haven't found.
Ah, okay. So you are comparing the padding on the right of the numeric cell to the padding on the left of the text cell? That seems like an odd comparison. I don't beleive that there is any standard for something like that. And I am pretty sure that no effort is made to make the padding on the left and the right match up.
Frankly, I can't imagine why anyone would care about that.
As a general rule, we try to make our controls match up to the look of the inbox controls as much as possible. So a text cell which uses the EditorWithText (UltraTextEditor) is as close as possible to the Inbox TextBox control. And as far as I am aware the padding in the TextBox is not even consistent with itself as far as the padding on the right and left goes.
Sorry for being imprecise.
Mike Saltzman"] I'm talking about the space between the displayed text and the column separator. I don't know how it is called (I would call it padding but apparently I'm wrong) so that's why I attached a screenshot to explain my problem (which is not obvious apparently). It's still not clear what padding you are referring to. Are you talking about the padding on the left of the text or the right of the text? Of course the padding will be different if the text is aligned differently. [/quote] On the screenshot I attached, the first column is aligned on the right, the second column is aligned on the left. I assumed that the right padding for the first column would have been the same as for the left padding of the second column. But maybe this is normal, or this is defined by a property I haven't found. Mike Saltzman"] I didn't say the alignment was the same Then what did you mean by this? tfresnea said:Note that the issue is still present if both content are aligned on the same side. [/quote] As I said, I was wrong about that point, the issue is NOT present if both content are aligned on the same side Cancel Reply Cancel
I'm talking about the space between the displayed text and the column separator. I don't know how it is called (I would call it padding but apparently I'm wrong) so that's why I attached a screenshot to explain my problem (which is not obvious apparently).
It's still not clear what padding you are referring to. Are you talking about the padding on the left of the text or the right of the text? Of course the padding will be different if the text is aligned differently.
[/quote]
On the screenshot I attached, the first column is aligned on the right, the second column is aligned on the left. I assumed that the right padding for the first column would have been the same as for the left padding of the second column. But maybe this is normal, or this is defined by a property I haven't found.
Mike Saltzman"] I didn't say the alignment was the same Then what did you mean by this? tfresnea said:Note that the issue is still present if both content are aligned on the same side. [/quote] As I said, I was wrong about that point, the issue is NOT present if both content are aligned on the same side
I didn't say the alignment was the same
Then what did you mean by this?
tfresnea said:Note that the issue is still present if both content are aligned on the same side.
As I said, I was wrong about that point, the issue is NOT present if both content are aligned on the same side
tfresnea said:I'm talking about the space between the displayed text and the column separator. I don't know how it is called (I would call it padding but apparently I'm wrong) so that's why I attached a screenshot to explain my problem (which is not obvious apparently).
tfresnea said:I didn't say the alignment was the same
I didn't say the alignment was the same, but you're right, I was wrong, the alignment is not the same and my problem depend on the alignment.
To summarize: - if both columns are align on the same side, no "padding" difference => no issue.- if I define a different alignment using CellAppearance.TextHAlign, I have the issue even if don't use a mask
I'm afraid I'm not following you. What padding are you referring to? It looks to me like your numeric column is aligned to the right and your text column is aligned to the left. These are the default alignments for text in the grid.
You say the alignment is the same, but it doesn't look like it to me. Which side are you aligning to and how you are applying that alignment?
If both of these columns are aligned to the left, then my guess is that the numeric column is accounting for the mask placeholders and that's why it's so far over to the right. To avoid that, you would have to change the mask to have fewer leading digits or else don't use a mask for your numeric column.