473,796 Members | 2,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple string list in a property grid

Hi,

I'm trying to display a list of string in the string collection editor
just like the "items" property of an ListBox in VS IDE....

I can find many examples on the net but I cant find any example like
items property of a listbox... I mean the String collection editor
with the text "Enter the strings in the collection (on per line)"

Is anybody can point me to the right object to use to define my string
collection object and/or a way to show the string collection editor
like ListBox items ??

Thanks,
Jul 18 '08 #1
2 7828
To get that exact editor you need to apply the attribute:
[Editor("System. Windows.Forms.D esign.ListContr olStringCollect ionEditor,
System.Design, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= b03f5f7f11d50a3 a", typeof(UITypeEd itor))]

to the property, that however generates code like this:

this.listBox1.I tems.AddRange(n ew object[] {
"sdfg",
"wef",
"wef",
"wef",
"wefwef",
"wef"});

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"michelqa" wrote:
Hi,

I'm trying to display a list of string in the string collection editor
just like the "items" property of an ListBox in VS IDE....

I can find many examples on the net but I cant find any example like
items property of a listbox... I mean the String collection editor
with the text "Enter the strings in the collection (on per line)"

Is anybody can point me to the right object to use to define my string
collection object and/or a way to show the string collection editor
like ListBox items ??

Thanks,
Jul 19 '08 #2
THANKS!!!!!!!!! !!!!!!!

after loosing hours trying to find how to do this it finally works!!

Thanks again!

Jul 19 '08 #3

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

Similar topics

0
7569
by: Tal Sharfi | last post by:
Hi everyone I recently had the need for StringGrid object same as the one that Delphi has. An object that helps show lists of other objects in a simple grid. I searched the news groups and found none, so, I wrote one and decided to share it with you. It's a very simple one with few functions. I derived a DataGrid and added to it a DataTable to hold the data. The object itself is handling the synchronization between them, because...
3
2385
by: Elliot Rodriguez | last post by:
Hi: I am writing a WinForm app that contains a DataGrid control and a StatusBar control. My goal is to update the status bar using events from a separate class, as well as some other simple things. The method I am writing queries a large dataset. As part of my feedback to the user, I am updating the status bar when the connection is made and the dataset is actually retrieved. The dataset retrieval method I have placed on a separate...
2
2351
by: Steve | last post by:
I'm in a weird situation where I'm using ComboBox's in a DataGrid. When the ComboBox selection changes, I'm currently storing the SelectedValue object into the DataSource of the DataGrid cell. This is not what I want. I want to bind a string to the datagrid, then bind the string and value of a lookup table to the combo box. When the combobox lookup is changed, I wanted to store the value in a different, unbound property of the bound...
0
3215
by: Daniel Sélen Secches | last post by:
I found a good class to do a simple FTP. Very good.... I'm posting it with the message, i hope it helps someone ============================================================== Imports System.Net
13
1860
by: Saber | last post by:
I did a lot of searches and read something about datagrids. But I couldn't find the answer of my simple question, how can I show only my desired columns of a table? for example I wrote this sql query: OleDbDataAdapter1.SelectCommand.CommandText = & _ "Select illNameE From tblIllness" OleDbDataAdapter1.Fill(DsIllness1) But in my datagrid, I get (null) for other ccolumns instead
0
1087
by: serge calderara | last post by:
Dear all, I have an application which collect information from a database and display them in a dagrid. I have apply to the grid a DataView object to get filtered information and bind the grid to that dataview. Then if my user click on a <ADD> button I would like to get the grid in an edition mode and my user can fill up information directly in.
3
13940
by: cowznofsky | last post by:
I'm getting data in a generic list class, which I'm not going to change. I would like to use it as a datasource for a datagrid or a gridview, but it doesn't implement IEnumerable. I'm wondering if there's a simple technique that would allow me to get the data into the datagrid.
3
5133
by: michelqa | last post by:
Hi, I have a form with a control..(a button for example). Then the control properties are displayed in a propertyGrid control. Is there any simple way to remove some unwanted properties from the propertyGrid....removing the "AccessibleName" properties by example? Any example about how to play with the PropertyDescriptorCollection to remove some properties??
0
3273
by: Kevinst | last post by:
Hi! Let's say I wanted to create a very simple control that is nothing but a LED. That LED can be active or inactive. Depending on that state its color changes. What is WPFs best practice to do so? Because I dont like the control the way it is right now at all. LEDControl.xaml: <UserControl x:Class="WpfPanelClient.Views.LEDControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
0
9530
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10459
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10236
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10182
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7552
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5445
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.