Hi Herfried,
Can you apply Graphics.MeasureString to other text such as the text in
a listview's column header? I tried to but the .Text property did not
support CreateGraphics. So is this just for Lables?
TIA,
John
On Mon, 21 Mar 2005 13:44:07 +0100, "Herfried K. Wagner [MVP]"
<hirf-spam-me-(E-Mail Removed)> wrote:
>"crosser" <(E-Mail Removed)> schrieb:
>> Hi, I want to adjust button height based on label text.
>>
>> Normally I have standard height because label text has one row, but the
>> text can change in runtime.
>> I want to adjust height of the button after text change, if the text is
>> too long and wraps to the second row and 3rd, and so on. The width of the
>> button never changes.
>
>You can measure the text shown in the label using 'Graphics.MeasureString'
>and then adjust the size of the button accordingly:
>
><URL:http://groups.google.de/groups?selm=eH5Ait%23KFHA.2804%40TK2MSFTNGP10.phx.gbl>
|