Skip navigation
Fonarix
Currently Being Moderated

Listbox with customized items

Jun 25, 2012 7:18 AM

Tags: #listbox

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.

 
Replies
  • Currently Being Moderated
    Jun 25, 2012 7:20 AM   in reply to Fonarix

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 25, 2012 10:10 AM   in reply to Fonarix

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 26, 2012 9:08 AM   in reply to Fonarix

    What is the 88? Does that correspond to a resource ID? If so, how is it setup? If not, is 88 just a random number to avoid collision? If you're using CreateItem(), it should be the latter, not the former.

     

    If none of that is a problem, I'm at a bit of a loss.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points