J
James Wong
Dear all,
Take the simple example of my case: There're two label controls and the
contents are assigned dynamically. I want to put the second one on the
right-hand-side of the first one without any gap between them. Since I
don't set the width property of both controls at design phrase to make them
"AutoSize" enable and avoid word-wrap, I can't get the width of the first
control to determine "position-should-be" of the second one at run-time.
Though somebody has designed a complicated method to calculate the actual
width of a string according to text content as well as font size, I found
that the size represented for label control is "small, medium, large, etc"
instead of the actual point / pixel size. I don't know how to convert
something like "small" to point / pixel size to start the calculation.
Does anybody have good idea to manage my problem? Thanks for your attention
and kindly help!
Regards,
James Wong
Take the simple example of my case: There're two label controls and the
contents are assigned dynamically. I want to put the second one on the
right-hand-side of the first one without any gap between them. Since I
don't set the width property of both controls at design phrase to make them
"AutoSize" enable and avoid word-wrap, I can't get the width of the first
control to determine "position-should-be" of the second one at run-time.
Though somebody has designed a complicated method to calculate the actual
width of a string according to text content as well as font size, I found
that the size represented for label control is "small, medium, large, etc"
instead of the actual point / pixel size. I don't know how to convert
something like "small" to point / pixel size to start the calculation.
Does anybody have good idea to manage my problem? Thanks for your attention
and kindly help!
Regards,
James Wong