PC Review


Reply
Thread Tools Rate Thread

Customizing ComboBox

 
 
Jose Fernandez
Guest
Posts: n/a
 
      9th Jan 2007
Hey...
How are you doing?

Ok, New Year's troubles...

I am trying to create a custom ComboBox (inheriting from ComboBox object).

Well, my whole goal is simple. I want to add some Properties, so, in Design
Time, i specify from wich entity i am gonna populate my Dropdown (using
Reflection and invoking a method to retrieve an arraylist with the values).

But, i have to admit i am getting lost on my way to achieve it.

I haven't been able to find a good article in google. I came to this forum.
I need help

thanks in advance
Jose


 
Reply With Quote
 
 
 
 
Stoitcho Goutsev \(100\)
Guest
Posts: n/a
 
      9th Jan 2007
Jose,

You didn't give enough information in order to give you more concreted
advice, but can't you just use standard databinding for that?


--
Stoitcho Goutsev (100)
"Jose Fernandez" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hey...
> How are you doing?
>
> Ok, New Year's troubles...
>
> I am trying to create a custom ComboBox (inheriting from ComboBox object).
>
> Well, my whole goal is simple. I want to add some Properties, so, in
> Design Time, i specify from wich entity i am gonna populate my Dropdown
> (using Reflection and invoking a method to retrieve an arraylist with the
> values).
>
> But, i have to admit i am getting lost on my way to achieve it.
>
> I haven't been able to find a good article in google. I came to this
> forum.
> I need help
>
> thanks in advance
> Jose
>



 
Reply With Quote
 
Jose Fernandez
Guest
Posts: n/a
 
      9th Jan 2007
OK.

what i want is that when i drag the CustomcomboBox to the form, then i
specify in the properties windows the name of the Entity (custom Object...
Employee for example).
So, using reflection, i invoke the Employee object, and then its methods
LoadCombo. This method returns an arraylist with the ID and FullName of the
Employee.

Ok, I want to create one and only customComboBox for this. Cause every
entity is going to have a LoadCombo method that will populate a Combo (by
returning an arraylist). So, very easy would be just to drag the
customcombobox to the form, write in the property window the entity name and
voila, when press F5 you should see the combo populated with the values.



"Stoitcho Goutsev (100)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Jose,
>
> You didn't give enough information in order to give you more concreted
> advice, but can't you just use standard databinding for that?
>
>
> --
> Stoitcho Goutsev (100)
> "Jose Fernandez" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hey...
>> How are you doing?
>>
>> Ok, New Year's troubles...
>>
>> I am trying to create a custom ComboBox (inheriting from ComboBox
>> object).
>>
>> Well, my whole goal is simple. I want to add some Properties, so, in
>> Design Time, i specify from wich entity i am gonna populate my Dropdown
>> (using Reflection and invoking a method to retrieve an arraylist with the
>> values).
>>
>> But, i have to admit i am getting lost on my way to achieve it.
>>
>> I haven't been able to find a good article in google. I came to this
>> forum.
>> I need help
>>
>> thanks in advance
>> Jose
>>

>
>



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      9th Jan 2007
As long as every object that is associated with a ComboBox has a property
that can be DataBound to the ComboBox, you shouldn't need to do this at all.
Just use normal DataBinding.

--
HTH,

Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com

Where there's a Will, there's a William.

"Jose Fernandez" <(E-Mail Removed)> wrote in message
news:%23%23g%(E-Mail Removed)...
> OK.
>
> what i want is that when i drag the CustomcomboBox to the form, then i
> specify in the properties windows the name of the Entity (custom Object...
> Employee for example).
> So, using reflection, i invoke the Employee object, and then its methods
> LoadCombo. This method returns an arraylist with the ID and FullName of
> the Employee.
>
> Ok, I want to create one and only customComboBox for this. Cause every
> entity is going to have a LoadCombo method that will populate a Combo (by
> returning an arraylist). So, very easy would be just to drag the
> customcombobox to the form, write in the property window the entity name
> and voila, when press F5 you should see the combo populated with the
> values.
>
>
>
> "Stoitcho Goutsev (100)" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Jose,
>>
>> You didn't give enough information in order to give you more concreted
>> advice, but can't you just use standard databinding for that?
>>
>>
>> --
>> Stoitcho Goutsev (100)
>> "Jose Fernandez" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Hey...
>>> How are you doing?
>>>
>>> Ok, New Year's troubles...
>>>
>>> I am trying to create a custom ComboBox (inheriting from ComboBox
>>> object).
>>>
>>> Well, my whole goal is simple. I want to add some Properties, so, in
>>> Design Time, i specify from wich entity i am gonna populate my Dropdown
>>> (using Reflection and invoking a method to retrieve an arraylist with
>>> the values).
>>>
>>> But, i have to admit i am getting lost on my way to achieve it.
>>>
>>> I haven't been able to find a good article in google. I came to this
>>> forum.
>>> I need help
>>>
>>> thanks in advance
>>> Jose
>>>

>>
>>

>
>



 
Reply With Quote
 
Stoitcho Goutsev \(100\)
Guest
Posts: n/a
 
      10th Jan 2007
I agree with Kevin. Take a look at the databinding feature. At the very this
is what databinding is all about.


--
Stoitcho Goutsev (100)

"Kevin Spencer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> As long as every object that is associated with a ComboBox has a property
> that can be DataBound to the ComboBox, you shouldn't need to do this at
> all. Just use normal DataBinding.
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> Bit Player
> http://unclechutney.blogspot.com
>
> Where there's a Will, there's a William.
>
> "Jose Fernandez" <(E-Mail Removed)> wrote in message
> news:%23%23g%(E-Mail Removed)...
>> OK.
>>
>> what i want is that when i drag the CustomcomboBox to the form, then i
>> specify in the properties windows the name of the Entity (custom
>> Object... Employee for example).
>> So, using reflection, i invoke the Employee object, and then its methods
>> LoadCombo. This method returns an arraylist with the ID and FullName of
>> the Employee.
>>
>> Ok, I want to create one and only customComboBox for this. Cause every
>> entity is going to have a LoadCombo method that will populate a Combo (by
>> returning an arraylist). So, very easy would be just to drag the
>> customcombobox to the form, write in the property window the entity name
>> and voila, when press F5 you should see the combo populated with the
>> values.
>>
>>
>>
>> "Stoitcho Goutsev (100)" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Jose,
>>>
>>> You didn't give enough information in order to give you more concreted
>>> advice, but can't you just use standard databinding for that?
>>>
>>>
>>> --
>>> Stoitcho Goutsev (100)
>>> "Jose Fernandez" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> Hey...
>>>> How are you doing?
>>>>
>>>> Ok, New Year's troubles...
>>>>
>>>> I am trying to create a custom ComboBox (inheriting from ComboBox
>>>> object).
>>>>
>>>> Well, my whole goal is simple. I want to add some Properties, so, in
>>>> Design Time, i specify from wich entity i am gonna populate my Dropdown
>>>> (using Reflection and invoking a method to retrieve an arraylist with
>>>> the values).
>>>>
>>>> But, i have to admit i am getting lost on my way to achieve it.
>>>>
>>>> I haven't been able to find a good article in google. I came to this
>>>> forum.
>>>> I need help
>>>>
>>>> thanks in advance
>>>> Jose
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Overriding / customizing ComboBox Gianluca Zangara Microsoft Dot NET 2 11th Dec 2009 02:18 PM
Howto make Combobox requery based on dependant combobox values Shane Microsoft Access Form Coding 1 22nd Apr 2008 09:14 AM
Customizing Items methods in a ComboBox user control =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= Microsoft C# .NET 1 18th Apr 2007 06:30 PM
Customizing a ComboBox =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= Microsoft C# .NET 5 17th Apr 2007 03:38 AM
HowTo? shift focus in VBA IDE between Object combobox, procedure combobox, and Code window Malcolm Cook Microsoft Access 0 11th Oct 2005 03:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:00 AM.