Re: Setting up an entity / collection listbox in code

2018-10-31 Thread Jeremy Roussak via 4D_Tech
Julio, you provide the answer to my question, which is “no”. I’m disappointed, I must confess. Everyone, thanks for suggesting workarounds. I hope the ability to specify the properties in code will be implemented - and soon! Jeremy > On 30 Oct 2018, at 20:10, Julio Carneiro via 4D_Tech

Re: Setting up an entity / collection listbox in code

2018-10-30 Thread John DeSoi via 4D_Tech
Maybe it could work if you adopted the convention that the collection properties are based on the listbox object name, e.g. Form.listbox1__currentItem Form.listbox1__selectedItems etc. You would have to adjust these properties after the first listbox, but I assume the component could manage

Re: Setting up an entity / collection listbox in code

2018-10-30 Thread Julio Carneiro via 4D_Tech
Jeremy, I have something similar to what you have, and I use entity selection. Except that I have a single column Listbox already set in the forms where I need them, The missing link for a completely dynamic Listbox is the ability to set the “Datasource” properties by code. As of V17r2, afaik,

Re: Setting up an entity / collection listbox in code

2018-10-30 Thread Jeremy Roussak via 4D_Tech
Jeremy / Kirk Thanks for the replies. They don'tt really address my question, though. As things stand, I have a component which sets up and manages listboxes which I’ve designed: I tell it the sources and the columns and it handles the rest. I plonk an empty listbox (of the correct type:

Re: Setting up an entity / collection listbox in code

2018-10-29 Thread Kirk Brooks via 4D_Tech
Jeremy, Jeremy French outlines the steps you need to follow. I would add a couple of ideas expanding on his post if you have multiple listboxes in a form. The first is simply adopt a custom of putting all the listboxes in a single object of the parent form. So I might have: Form.LB.A... Which

Re: Setting up an entity / collection listbox in code

2018-10-29 Thread Jeremy French via 4D_Tech
> It’s great to be able to make generic listboxes and set them up entirely in > code. It’s easy for array-based and selection-based listboxes, but can it be > done for entity/collection boxes? Yes. It's even more easy using collections. > In other words, are there LISTBOX SET xx calls to