How to set right justify (EpiTextBox) in customization tools dialog for numeric data

in customization tools dialog, i add a Toolbox (EpiTaxBox) with EpiBinding a UD field (Decimal, Default Format: ->>,>>9.99, Decimals: 2), the numeric figure always display left justify, how can i set it to right justify? many thanks for your help.

Use EpiNumericEditor and not Textbox

Add the InitializeCustomCode in customization script:

txtRTL.Appearance.TextHAlign = Infragistics.Win.HAlign.Right;

or use the EpiNumberEditor control

I am a beginner. Would you please tell me how to accomplish this? I have the opposite problem. I need to get an epiLabel to left-justify.

Some details depend on if it is a native label, or one you added.

Do you know how to launch a form in developer mode and enter customization mode?


If the control is one you added, just put the following in the InitializeCustomCode() section in the Script Editor.

lblUD05.Appearance.TextHAlign = Infragistics.Win.HAlign.Right;

If it’s a native control (one in the base form), you’ll need to make a variable to refer to the control, then use the GetNativeControlReference() function

EpiLabel myLabel = (EpiLabel)csm.GetNativeControlReference(“xxxxx-xxxxx-xxxxx-xxxxx-xxxxxx”);
myLabel.Appearance.TextHAlign = Infragistics.Win.HAlign.Right;

Replace the xxxx-xxx... part with the GUID of label.


Thanks for the reply. I’m obviously going to have to read up on the script editor. I tried both methods but neither worked. Sorry to be so dense. I’m new at the scripting and don’t know much about coding. Do you see what I’m doing wrong? The name of the control is epiLabel2



Whoops … should have been

epiLabel2.Appearance.TextHAlign = Infragistics.Win.HAlign.Left;

And since it is not a native control, no need for the “GetNative…” line

Here it is in Cutomization Mode:

And the result when run:

Thanks for the reply but no luck. It compiles OK but has no effect. Do you see anything wrong

public static void InitializeCustomCode()
	epiLabel2.Appearance.TextHAlign = Infragistics.Win.HAlign.Left;

Not sure what’s up.

I added an epiLabel named epiLabel2 with the following properties:
(no coded added yet)


And when run it shows as:


After adding (the lines in the red box):


The runtime shows as:


You can see that the control hasn’t shrunk, as the right edge covers the textbox txtPartSerial

There are no other references to epiLabel2 in code.

Perhaps you need to unbind it from any input control it is the label for.

I tried it with the label bound to another control and it still works.

Do you have anything like multiple languages enabled, or special theme that might be overriding it?

Nope. I’ll keep working on it. Thanks for your help

I saved the Dashboard, closed and reopened it, and now it works.

Thanks, again. You’ve been a great help

Here is how I solved it. Multiline needs to be set to true.