Skip to main content
Participating Frequently
June 25, 2012
Question

Listbox with customized items

  • June 25, 2012
  • 1 reply
  • 2639 views

Hello,

I need to create a ListBox with custom items.

Each item should consist of two elements: from static text on the left and edit text item on the right.

I'm using ADM, is it possible to do?

Thanks in advance.

This topic has been closed for replies.

1 reply

A. Patterson
Inspiring
June 25, 2012

By 'edit text' you mean a line edit control?

You can definitely do that I believe with the ADM, but to do so you're likely going to need to do it with a custom ADM control. I've never exerted that much custom control over an item, but I don't see why you couldn't do that. It'll be a fair bit of work though.

FonarixAuthor
Participating Frequently
June 25, 2012

Thanks, for your reply.

"custom ADM control" do you mean draw this item with primitives, like text, line etc?

I'm asking because I need  something like list box, with variable name and possibility change dynamically this item in one entity.

Maybe the best way just add column of static texts, column of edit controls and fake vertical scroll on the right, handle it...

A. Patterson
Inspiring
June 25, 2012

Yeah, I mean you'd draw it with primitives. Honestly, I'm not sure how easy it is to do things like "When you click here, create a line edit control", etc. Other people have wanted to do the same thing you're talking about, I can remember them asking. I don't think they ever posted to say what they ended up doing (or if they had to give up even). One common idea that crops up in that is what you've suggested, ie. two columns of items and faking the scroll.

I think it is possible to create a custom widget and have child widgets though with the ADM. so you might be able to do a custom control and add line edit & labels as rows, maybe draw the line between them or something. I'm not 100% sure though. You'd probably need to keep a collection of pointers for each column and manage adding/deleting them yourself, plus resizing the custom widget to display them. Probably not a terrible amount of trouble to test that with a couple of rows as a test. If that worked, the scrolling would take care of itself at least.