listbox and editing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dan heskett

    listbox and editing

    I'd like to modify the standard .net list box to allow in place editing of
    the data.

    I am owner drawing a complex listbox item, but first off, is this even
    advisable?

    I have a simple list and I'd like the user just to be able to right click,
    selected edit, and be thrown onto the listbox to edit.

    I tried dropping a textbox onto the item in the Drawitem function, but I
    couldn't seem to make that work appropriately.

    Anyone have any general strategy ideas on how this could be done, if at all?

  • Cor Ligthert [MVP]

    #2
    Re: listbox and editing

    Dan,

    You can set by options a datagrid in a way that it looks almost as a
    listbox, why not using that?

    Cor


    Comment

    • dan heskett

      #3
      Re: listbox and editing

      Cor,

      Thanks for the response. The datagrid is very "heavy" compared to the
      listbox; on top of that I am owner-drawing the display of the listbox to a
      very custom layout and it works very well - it can very handily display all
      the data I want with no special hacking around.

      I think if my current approach to inline editing fails I'll just use a
      sub-window that pops up for editing.

      --dan

      "Cor Ligthert [MVP]" wrote:
      [color=blue]
      > Dan,
      >
      > You can set by options a datagrid in a way that it looks almost as a
      > listbox, why not using that?
      >
      > Cor
      >
      >
      >[/color]

      Comment

      • Cor Ligthert [MVP]

        #4
        Re: listbox and editing

        Dan,

        What do you mean with heavy? It is just a control in the framework, the same
        as the listbox is.

        Cor


        Comment

        • dan heskett

          #5
          Re: listbox and editing

          Cor,

          If you setup a simple test you can see what I mean. Load up a listbox on a
          form, add 10,000 items, and remove half of them. Take a look at how many
          memory the process is using.

          Do the same with a datagrid.

          The result is that the datagrid uses 2x-3x the memory of the listbox. It's
          especially bad when you have more than one on a form; forwhatever reason the
          listbox is many times more efficent, and noticeablely faster loading data and
          becoming responsive after large operations.

          On top of that, it's easier for me to customize the layout by owner drawing
          the listbox to fit exactly the layout I want for each item.

          --dan

          "Cor Ligthert [MVP]" wrote:
          [color=blue]
          > Dan,
          >
          > What do you mean with heavy? It is just a control in the framework, the same
          > as the listbox is.
          >
          > Cor
          >
          >
          >[/color]

          Comment

          • Cor Ligthert [MVP]

            #6
            Re: listbox and editing

            Dan,

            Of course can the listbox process data more efficient, although what is it
            processing. It is an only displaying control. The datagrid has large
            possibilities to edit, update and insert data down to a datasource
            (editing).

            You never get possibilities for nothing.

            However I had the idea that editing was your question.

            Sorry for misunderstandin g you

            Cor


            Comment

            Working...