Listbox +getselectedtext problem lazarus / 13-General ---------------------------------------------------------------------- Marvelloard · 2007-10-27 20:52 Hi, I use to read the selected text in a listbox and put it into an edit field with: edit1.text:=form1.ListBox1.GetSelectedText; It works quite well, but in the edit field there are being two chars added that must not be there. I tried to copy the content of the edit field here, but it seems that the chars are breaks as if the line breaks after copying. I have to get rid of the char(s) at the end of the string, help!! Maybe it's a bug? If I want to get the selected text, I don't want a break at the end XP Prof. 32 Bit using Lazarus 0.9.22 Beta. ---------------------------------------------------------------------- antonio · 2007-10-27 23:25 edit1.text := trim(ListBox1.GetSelectedText); ---------------------------------------------------------------------- Marvelloard · 2007-10-28 11:14 Oh, cool! THANK YOU!!!