PDA

Click to See Complete Forum and Search --> : ComboBox Help


ScarEye
Mar 14th, 2005, 06:13 PM
Hey guys what's up, just to let everyone know I am a total n00b to C#, I have done alittle vb.net but no C# at all.

Anyway this is what happened. I have a program here that I have to modify.

Now in this program there is a combobox but it's not a regular combobox in other words you know how when you create a combobox from the toolbox it comes up as "combobox1 system.windows.forms.combobox"

This combobox comes up as:

storecombobox "mis.controls.stores.storecombobox"
and under data,items,collections (in the properties pane) there is
option for that, like you would normally have in system.windows.forms.combobox.

I need to add a few more items to this combobox but I have no idea where it is.

But there is something else I should mention. I was just browing the folders and I saw mis.controls.dll <-- would it be in this dll ? If so how do I go about editing this so I can add onto the combobox ?

I hope I made this clear.. If not ask, ask me a question and I will try to explain it better.


Thanks In Advance...
ScarEye

MrPolite
Mar 14th, 2005, 08:03 PM
uuh ok first of all tell me what you're doing, because I don't understand why you would want to use a different combobox and not the one that comes with .NET. The Windows Forms combobox should do for most needs.

second, what type of dll is this? .NET dll?
You can't modify a dll (unless it's .NET and you decompile it, which would be illegal:) ). You could try inheriting from the combobox that's defined in that dll and then add your own methods and etc to your inherited class. For example:

public class MyComboBox:mis.controls.stores.storecombobox
{
// override methods or add new ones here
}



I think you should just use the .NET comboboxes. I have no idea what that dll is

ScarEye
Mar 15th, 2005, 02:36 AM
uuh ok first of all tell me what you're doing, because I don't understand why you would want to use a different combobox and not the one that comes with .NET. The Windows Forms combobox should do for most needs.

second, what type of dll is this? .NET dll?
You can't modify a dll (unless it's .NET and you decompile it, which would be illegal:) ). You could try inheriting from the combobox that's defined in that dll and then add your own methods and etc to your inherited class. For example:

public class MyComboBox:mis.controls.stores.storecombobox
{
// override methods or add new ones here
}



I think you should just use the .NET comboboxes. I have no idea what that dll is


someone from our job wrote this program for the company, but now he is gone. So the company owns that .dll and I needed to update it because he is calling information from that .dll, to make a long story short.. I figured it out a couple of hours ago, and I got it working.. I didn't need to decompile the .dll because it was there, I just had to find it add more information to that dll, and re-compile it. So that's what I did and everything is good now.


Thanks for you help...

ScarEye

mendhak
Mar 15th, 2005, 03:10 AM
If you need to add items to the combobox, use its .Items.Add() method!

ScarEye
Mar 15th, 2005, 03:22 PM
If you need to add items to the combobox, use its .Items.Add() method!


Sorry that won't work here. The person that wrote this program put all value(s) for the combobox in a .dll, So I had to open up that .dll update my information, re-compile the .dll and waa laa, it did the trick.

At first I was going crazy looking for .Items.Add but I couldn't find it anywhere, until I saw in the properites window that it was going to
MIS.Controls.whatever.whatever. and not the normal
system.windows.forms.combobox

and there was a .dll called mis.controls.dll and it was pulling that information
from here....

Thanks
ScarEye