1. Strange.....

Hy,

I'm using this for let text fit in a SLE in Dos32Lib (for
ES_AUTOHSCROLL),
but it doesn't work.
First time it works, but the times after that it shows
it shorter and shorter till negative values.
And that's something I don't understand at all,
but I think get_text_size() isn't working right.

function shorten(sequence text,integer maxsize)
integer count
count=0
while count !=length(text) do
 count+=1
 text=text[count..length(text)]
 if get_text_size(text,0)+16 < maxsize then
  exit
 end if
end while
 return text
end function

text=shorten(text,my[self][Size][X2])


Bye,
PQ
QC
Get Your Private, Free Email at http://www.hotmail.com

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu