Re: Right Justify Textbox

Tech-Archive recommends: Fix windows errors by optimizing your registry




Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control
For Each ctl In frm.Controls
If TypeOf ctl Is TextBox Then
DirectCast(ctl, TextBox).Style("TEXT-ALIGN") = "right"
End If
End Sub


u can changed left, center.
regards,

Leonard wrote:

How do I right justify input data in a textbox? I have some textboxes that are used to input numbers, and I would like to right justify them.


.



Relevant Pages

  • Re: Disabling Controls
    ... >>>dim frm as Form ... >>>dim ctl as Control ... for each ctl in frm ...
    (microsoft.public.access.modulesdaovba)
  • Re: Disabling Controls
    ... >>dim frm as Form ... >>dim ctl as Control ... for each ctl in frm ...
    (microsoft.public.access.modulesdaovba)
  • Re: ItemSelected - got a Compiler "not defined" error
    ... What happens if you declare a list box rather than merely a control: ... Dim frm As Form, ctl As Listbox ... > Private Sub Sum_Click ...
    (microsoft.public.access.modulesdaovba)
  • Re: Clearing All Input Boxes
    ... the bound control issues. ... Dim frm As Form ... For Each ctl In Me.Controls ...
    (microsoft.public.access.formscoding)
  • Re: Max Value of Field (with a twist)
    ... I have formatting on the report and if the field ... Dim ctl As Control ... For Each ctl In Me.Controls ... If Me.Controls.Value> varMax Then varMax = ...
    (comp.databases.ms-access)