Fancy filelist lazarus / 31-LCL ---------------------------------------------------------------------- Hendrikus · 2017-07-07 15:26 Hello all, I'm entirely new to user-interfaces, Always programmed processes and business rules. And now, my first challenge regarding the userinterface of my program. What I want is give the user a directory pick (done) and a TfileListBox showing the files of the chosen directory. (done, works good). But then... the user selects 1 or more files (multiselect on). After that, he clicks a button which will process all the selected files from the filelistbox. I've saved all the selected indexes of the filelistbox in an array, which I loop through. I even managed to change the color of the selected item in the listbox. Just one problem, Before processing the array, all the selected items of the listbox are ... gone. I want them to keep their selected color and in the loop of the array the "current" selected item must get another color. The TfilelistBox.Style := lbOwnerDrawFixed and I'm playing around with procedure TForm1.FileListBox1DrawItem(Control: TWinControl; Index: Integer;   ARect: TRect; State: TOwnerDrawState);  but still no solution. Hope made myself clear to describe the problem. Attached is a screenprint from how it looks now. After selecting a few files an clicking Button1 I want the selected items to keep their "selected" color, except for the one who's processed right now. All the indexes of the items to be processed are in aan array. Is there anyone who can point me the right direction? Thanks Hendrikus ---------------------------------------------------------------------- Handoko · 2017-07-07 16:41 Please provide the compilable source code, sample data and the steps to reproduce the issue. If you are not willing to publicize your project, you can create a demo project that can show the issue. Copy all the needed files to a new folder (except: *.exe, *.bak and lib folder), compress the folder and send the zip file to this forum. ---------------------------------------------------------------------- howardpc · 2017-07-07 19:29 Rather than try to do all your highlighting in the one filelistbox, it may be preferable to use an ancillary listbox showing only the user selection(s). This makes it somewhat easier to paint correctly as the selections are processed. See the attached example.