Aligning text in label

  • Thread starter Thread starter Linux Boy via .NET 247
  • Start date Start date
L

Linux Boy via .NET 247

(Type your message here)
Hi everyone,

I would like to ask a question about aligning text within one label.

I have an application that everytime the user click on Enter Record button, they will be prompt an input box to enter employee names and sales figures.

The output then will be displyed in only 1 label using a For loop. The layout would be under 3 columns: Employee name (left justified), Sale figures (right justified) and Bonus type(right justified).

I have tried many methods including using padright(padlfet) and string.format methods but the output strings still not be in a proper column layout.

Colud anyone show me how to fix this problem.

Thanks in advance.
 
If I understand you correctly, you are trying to make a single label into a
one row table ?

If my assumption is correct, there is no easy way to do what you are asking,
I dont understand why you cant use three conjoined labels, this way you can
use the alingn property of the label to put your text where you need it.

Also, it is not clear to me where the data is supposed to be in this little
scenario, surely your not putting that in the label as well ?

Why not use a DataGrid Control, this will do what you need

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

Linux Boy via .NET 247 said:
(Type your message here)
Hi everyone,

I would like to ask a question about aligning text within one label.

I have an application that everytime the user click on Enter Record
button, they will be prompt an input box to enter employee names and sales
figures.
The output then will be displyed in only 1 label using a For loop. The
layout would be under 3 columns: Employee name (left justified), Sale
figures (right justified) and Bonus type(right justified).
I have tried many methods including using padright(padlfet) and
string.format methods but the output strings still not be in a proper column
layout.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top