473,398 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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?

Nov 21 '05 #1
5 1928
Dan,

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

Cor
Nov 21 '05 #2
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:
Dan,

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

Cor

Nov 21 '05 #3
Dan,

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

Cor
Nov 21 '05 #4
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:
Dan,

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

Cor

Nov 21 '05 #5
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 misunderstanding you

Cor
Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Kyralessa | last post by:
In Access 2000, I have a base form with a ListBox of conference registrants. In the form's declarations section I include Dim f as Form To add a registrant I'm doing this: Set f = New...
2
by: PC User | last post by:
I'm creating a shortcut menu to popup over my richtext box. Its a form with a listbox of menu items with associated richtext activex (rtf) editing commands. I found a way to transfer a value from...
4
by: Andy Weinmann | last post by:
I need to make a form through which I can edit the information for companies. I used a form in which the textboxes read from different columns from a listbox to display the information for a...
0
by: JMe9ka | last post by:
I have a ListBox to which I am assigning a DataTable as a DataSource, as shown below. ======================================================= DataTable VendorData = new DataTable(); // Code...
2
by: David Ichilov | last post by:
I've class derived from "Object" class, with ToString() method overriden itc. , now i add object of this class to Windows.Forms.ListBox.Items collection, and it works fine, displaying what...
7
by: Byron | last post by:
I'm looking for a way to deny a move from the current listbox item. For instance, if the user is editing the record associated with the current listbox item I want to deny a move within the...
1
by: Dan Bass | last post by:
I'm looking to develop a listbox with in-place editing where as each item is selected, it grows to fit in all the text boxes. When the item is deselected, it shrinks back to its original size. The...
0
by: Richard Fennell | last post by:
I am trying to use asp:listbox on a form, when a user selects a row in the asp:listbox a panel is displayed on the centre of the screen with a message, a bit like a model dialog on the form. The...
4
by: Marcos Beccar Varela | GamaCom Argentina | last post by:
Hello Everyone. I need to use a gridview, that when I use the Update command one of the colums, instead of showing a textbox where the user can write, I need a combobox (listobx), where there are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.