I'm currently working on adding StaticTextField controls to a page. We are using ExtJS, but we incorporate VB.NET methods for implementing ExtJS so manual coding isn't necessary.
So far, I attempted to align the text to the right by using this code:
.Style = "text-align:right"
However, this method has proven ineffective and did not produce any results. Here is the complete code snippet for one of the controls:
With .AddColumns(2)
With .Item(1)
.LabelWidth = 150
With .AddControl(New Forms.Control("LoanProceeds", "../../loanProceeds", "Loan Proceeds", IIf(Model.LoanProceeds <> 0, Model.LoanProceeds, "$0.00"), Forms.Control.ControlType.StaticTextField))
.Validate.AllowNegative = False
.Validate.AllowDecimals = True
.Style = "text-align:right"
.ReadOnly = True
End With
All these controls are nested within a column, which in turn is enclosed within a fieldset that resides inside a panel.
Does anyone have insight into why these static controls are not being aligned to the right using CSS? Interestingly, when applying the same code (CSS) to right-align comboboxes or number fields, it works perfectly. These elements are positioned directly beneath the static controls, yet the alignment issue persists only with static controls. They must remain static to avoid the box outline around each value, keeping them solely as plain text on the screen.
Your assistance would be tremendously valued.