|
<SfNumericTextBox TValue="int?" Value=10 EnableRtl="true"></SfNumericTextBox> |
|
|
I don't think this is the answer he was looking for; what I think he wants and what I want is to justify the number to the right, which is different from rendering it from the right which is necessary for some languages, but not western languages. It is customary to align the number to the right so that the decimal points line up. I've tried, and failed with CSS. Would you please provide and answer on how to accomplish this with the numeric textbox. Thanks.
Kevin is right. That's what I need.
|
@using Syncfusion.Blazor.Inputs
<SfNumericTextBox TValue="int?" Value=10></SfNumericTextBox>
<style>
/*The below styles is used to render the text in the right*/
.e-input-group input.e-input, .e-input-group.e-control-wrapper input.e-input, .e-input-group textarea.e-input, .e-input-group.e-control-wrapper textarea.e-input {
text-align-last: end;
}
/*Below styles set the left margin for the down spin arrow which seprates the icon from the text instead of showing it as sticky*/
.e-input + .e-input-group-icon, .e-input-group .e-input + .e-input-group-icon, .e-input-group.e-control-wrapper .e-input + .e-input-group-icon {
margin-left: 10px;
}
</style> |
Thank you for the quick reply, and the solution I was looking for. I'm certainly glad I asked because I am sure I would have never ventured your solution. I really like the Syncfusion Blazor components, but the most problematic area for me has to do with the clarity of CSS modification of the components. For example, in this instance, it would seem logical to me to simply have 'text-align:right'. Regardless, I very much appreciate that what you provide simply works!
Thank you very much!
Hello,
I use that, and it works :
<SfNumericTextBox Decimals=0 style="text-align-last:end; margin-right:10px;" ShowSpinButton=false CssClass="e-outline" Placeholder="Some text" FloatLabelType="@FloatLabelType.Always" @bind-Value="@CreateEditEntity.Field"></SfNumericTextBox>
Best,
Gilles
Hi GB-Fr,
Thanks for your update.
Regards,
Sureshkumar P
Hello, I am applying the solution mentioned in this forum, and it works correctly, but when I try to use read-only, the background color does not set properly. Could someone show a way to fix it without losing the 10px margin on the right?
Pablo
Hi Társis,
Thank you for the update. To properly apply a background color to the readonly NumericTextBox while retaining the 10px margin on the right, you can use the following CSS styles. These ensure that the design is visually consistent and the specified styles are applied effectively:
|
Sample: https://blazorplayground.syncfusion.com/hDrojssJKQliIHnP
Regards,
Priyanka K