Hello,
how to set label location in top middle at run time according to the text length. For example i have one panel control of size 316,162 and one label at top it displays the security que from the database like what is your pet's name? Or who is your favourite childhood hero? So according to the text length it should come in the middle. For long text no probs but for small it display in left only.
Jigs28
0
Light Poster
Recommended Answers
Jump to PostSo what exactly are you trying to do? Move the label around so that the text always appears in the middle?
Could you not just make the label the maximum size it could be and set the text align to middle?
Jump to PostForgive me if im wrong for arguing though, if you made your label span from one side of the form to the other, and did text align center, the text (regardless of length) will always sit within the center or the form.
From what your saying thats the simplest …
All 6 Replies
Mike Askew
131
Veteran Poster
Featured Poster
Jigs28
0
Light Poster
Mike Askew
131
Veteran Poster
Featured Poster
Jigs28
0
Light Poster
lxXTaCoXxl
26
Posting Whiz in Training
Jigs28
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.