[MonoDevelop] Force ComboBoxEntry DropDownList to show programatically
Nicolas Krzywinski
opensource at site7even.de
Thu Dec 1 15:40:20 EST 2011
Isn't Gtk.ComboBox.Popup() what you want?
Nicolas
Am 01.12.2011, 07:06 Uhr, schrieb Aaron Radich <aaron at radich.com>:
> Thanks for the suggestion. I couldn't get it to work, though, as I've
> got 1 million search values and therefore I only want to populate the
> Completion on the fly, with just the list store values that match what
> the user typed into the Entry. The EntryCompletion appears to need to
> be populated before the user starts typing into the Entry. So, I'm back
> to wanting to use the ComboBox. I've got it working 95%, would just
> like to force the DropDown to display once it's populated.
>
> Aaron
>
> On Wed, 2011-11-30 at 20:32 +1300, Daniel Hughes wrote:
>
>> Sorry you append the values to the ListStore the last few lines should
>> be
>>
>>
>>
>> //append values
>> listStore.AppendValues ("one");
>> listStore.AppendValues ("two");
>> listStore.AppendValues ("three");
>>
>>
>>
>>
>>
>> On Wed, Nov 30, 2011 at 8:28 PM, Daniel Hughes <trampster at gmail.com>
>> wrote:
>>
>> What you want is an Entry widget with the EntryCompletion
>> property set. I use this in WideMargin so display a list of
>> matching book names as they type in a drop down which they can
>> select from. The code is open source and is available here:
>>
>>
>>
>> https://bitbucket.org/trampster/widemargin/src/5d4ea179adc1/WideMargin.GUI/SearchPage.cs
>>
>>
>> Basically it's as follows:
>>
>>
>> var listStore = new ListStore (typeof (string));
>>
>>
>> var completion = new EntryCompletion();
>> completion.TextColumn = 0;
>> completion.Model = listStore;
>>
>>
>> var entry = new Entry();
>> entry.Completion = completion;
>>
>>
>> //append values
>> completion.AppendValues ("one");
>> completion.AppendValues ("two");
>> completion.AppendValues ("three");
>>
>>
>> Now as you type it will fill the drop down with the matching
>> entries.
>>
>>
>> Cheers,
>> Daniel
>>
>>
>>
>>
>> On Wed, Nov 30, 2011 at 7:53 PM, Aaron Radich
>> <aaron at radich.com> wrote:
>>
>> Is there any way in code to make a ComboBoxEntry force
>> it's dropdown to show, as if the user pressed the down
>> triangle? I'm trying to simulate an instant search
>> scenario where the user types some text into the
>> ComboBoxEntry and then in code I populate the dropdown
>> list and then make it dropdown so that it's visible.
>> Any suggestions would be appreciated.
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Monodevelop-list mailing list
>> Monodevelop-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>>
>>
>>
>>
>>
>>
>>
>
>
--
www.site7even.de | www.nskcomputing.de
More information about the Monodevelop-list
mailing list