|
Well, what have you tried ? This is pretty trivial, is it for a class ? Surely you have some sort of reference books for your classes ?
I'm not sure what's more astonishing, that you got an answer to this question an hour ago and you're posting it again, that you've been a member for 18 months and can't work this out, or that it looks to me like you're either doing paid work or are well into a comp sci course, and would post this again, with less detail, and be incapable of working it out for yourself, or at least having some code to show us to prove you tried to do something more than ask us to do your work for you.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You want to open a new form when the combobox is clicked?
Handle the click event and open the new form form there.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
christian graus if u cant help people then dnt criticise them..
|
|
|
|
|
You replied to wrong post.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
foreach (DataRow dr in ds.Tables[0])
{
string colName = dr["a"].ToString();
TreeNode node = treeView1.Find(colName);
if (node == null)
{
node = treeView1.Nodes.Add(colName, colName);
}
node.Nodes.Add(dr["b"].ToString());
}
when runing the code it shows:
"System.Windows.Forms.TreeView" does not contain a "Find" Definition?
can someone help me
very thanks!!@
|
|
|
|
|
|
miss YY wrote: im online waiting!
you are incredibly rude. You waited two minutes and thought you'd demand an answer to a question my 9 year old could have worked out ( he knows how to use google ). If you want instant help, pay for it. Especially when you're too lazy to do any research or think about your code, you have no right to demand an answer from us, certainly not within two minutes.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
And you expect that to get you an answer, thank God your not from India it would have led to so many steriotypes. Read the guidelines at the top of the page, no doubt you have been told this before and ignored it.
|
|
|
|
|
You should read the post on how to ask a question. 'someone who can help me' is hardly descriptive.
The error message means what it says, the tree view does NOT have a Find method. looking at your posts, I wonder if you're copying code at random off the web, and if you have any idea what any of it means. Surely you can use google, read your references, etc, or even use intellisense to work out that there is indeed no find method on a treeview ?
The Nodes property of a TreeView has a Find method. I sure hope this is homework, because no-one should be paying for this code. You should talk to your teacher and let them know that you're confused and incapable of searching the web or reading documentation, so they can make a recommendation about your future viability in this course.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
It should actually be treeView1.Nodes.Find . When I posted the code sample the other day, I just typed it directly into the editor so there were bound to be mistakes. A bit of logical thought would have told you where the Find method for Nodes would actually be. If you want to continue as a developer, you need to be able to analyse a problem to work out what solutions to problems are likely to be and where you need to look for them.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Shame on you Pete, YOUR code was broken and now WE needed to fix it so she could pass her class.....
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I'm surprised she actually tried it.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hi,
Does any one know any books written on MVC design pattern for windows application development from .NET?
thanks
|
|
|
|
|
It's not complex enough to need a book, the pattern is covered in the book 'Design Patterns'.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
There are many articles on the Internet that go a good job of explaining MVC pattern. It is not complex enough to require a whole book.
|
|
|
|
|
hw can i add columns headers to checklistbox columns
|
|
|
|
|
I don't know that a list box has column headers, I thought only a listview did.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
AFAIK, you cannot. Unless you extend it. You can either use a DataGridView, if you are using a datasource to bind to control or a Listview with checked (or something similar) property set to true.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Stick a Label above the CheckListBox (like everyone else does).
Regardless of the number of "columns", the Items are all of the same type; it's just a scrolling convenience.
|
|
|
|
|
Use a ListView and set CheckBoxes property to true
|
|
|
|
|
Hi,
I have used the below code
MyClass myclass =(MyClass) ListBox.SelectedItem;
try
{
// This causes the exception
Size size = myclass._Image.Size;
}
catch
{
flag = true;
}
Try to give the answer ASAP.
Thanks,
Lingaraj S.
|
|
|
|
|
Lingaraj S wrote: Try to give the answer ASAP.
The answer seems to be that you don't know C# and you are rude.
Obviously the error is in yuor class. I'd say the image has been disposed of, or is somehow invalid. Impossible to say based on the code you posted.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi Christian,
The below code I have used in applciation. To get a Image value
imageList.Add(new MyClass("name" + (i + 1), i, imageList2.Images[i]));
this.comboBox1.DataSource = imageList;
this.comboBox1.ValueMember = "_Image";
this.comboBox1.DisplayMember="Name";
this.comboBox1.SelectedIndex = 1;
MyClass myclass =(MyClass) this.comboBox1.SelectedItem;
try
{
// This causes the exception
Size size = myclass._Image.Size;
}
catch
{
flag = true;
}
Thanks,
Lingaraj S.
|
|
|
|
|
How many images are in "imageList", and where do you think ".SelectedIndex = 1" is pointing to?
|
|
|
|
|
To me, it's like you have no idea about programming at all. This doesn't answer any questions. You need to tell me what imageList2 is, where it comes from, what you do with it, what MyClass looks like, etc.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|