D
Dan Ardelean
Hy,
Compact framework supports only:
public SizeF MeasureString(string, Font);
but not:
public SizeF MeasureString(string, Font, int);
where I give the maximum width and it returns the SizeF
structure with information about the heigth. Any ideas of
how can I implement (simulate) the second method?? Why do
I need it? I generate a listbox with text items from
database and I don't want the horizontal bar to appear and
the largest text to be visible (to set the height so the
largest text is visible). I look at the article on
OpenNETCF abut owner draw list and the height is set
statically to 2 lines if wrapttext property is set and the
text is too long. Does anyone knows which is the algorithm
for word wrap. Does this can be done in another way? (to
set the heigth of the items in a list so the largest text
in the list is visible entirely and without horizontal
bar)!
Hope I explained myself!
Thanks!
Best regards,
Dan
Compact framework supports only:
public SizeF MeasureString(string, Font);
but not:
public SizeF MeasureString(string, Font, int);
where I give the maximum width and it returns the SizeF
structure with information about the heigth. Any ideas of
how can I implement (simulate) the second method?? Why do
I need it? I generate a listbox with text items from
database and I don't want the horizontal bar to appear and
the largest text to be visible (to set the height so the
largest text is visible). I look at the article on
OpenNETCF abut owner draw list and the height is set
statically to 2 lines if wrapttext property is set and the
text is too long. Does anyone knows which is the algorithm
for word wrap. Does this can be done in another way? (to
set the heigth of the items in a list so the largest text
in the list is visible entirely and without horizontal
bar)!
Hope I explained myself!
Thanks!
Best regards,
Dan