[Gtk-sharp-list] [Mono GTK#] Set Combobox Selected by Value

Jay Spencer jacob.spencer80 at googlemail.com
Thu Sep 19 15:29:27 UTC 2013


I don't want to insert/add items to my combobox.

All I want to do is set the selected value programmatically.

In winforms it was a simple .selectedvalue =

But in gtx# I can't do that.
On 19 Sep 2013 16:25, "huseyin cakir" <huseyin.cakir35 at gmail.com> wrote:

> Can't understand question but i have an example maybe it helps,  its about
> changing combobox text;
>
> cmbFxTopUpWrite_Description.Changed+= new
> EventHandler(cmbFxTopUpWrite_Description_Changed);
>
> ...
> cmbFxCardWrite_OperationTypes.RemoveText(0);
>
> cmbFxCardWrite_OperationTypes.InsertText(0,"0");
> cmbFxCardWrite_OperationTypes.InsertText(1,"1");
>
> ...
>
>
>
> On Thu, Sep 19, 2013 at 5:42 PM, jaymarvels <
> jacob.spencer80 at googlemail.com> wrote:
>
>> In Winforms I can easily do:
>>
>> cboNations.SelectedValue = 139;
>>
>> And this will set my combobox where the value (NOT index) is 139.
>>
>> I have a combobo in gtk# where i have bound a ListStore to it already.
>>
>> Now, further along in my project I want to set the selected item by the
>> value.
>>
>> I have tried doing what i'd do in winforms with no luck.
>>
>> Any pointers..can't believe gtk# would be so tricky..
>>
>>
>>
>> --
>> View this message in context:
>> http://mono.1490590.n4.nabble.com/Mono-GTK-Set-Combobox-Selected-by-Value-tp4660923.html
>> Sent from the Mono - Gtk# mailing list archive at Nabble.com.
>> _______________________________________________
>> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>>
>
>
>
> --
> Hüseyin Çakır
>
> Web: http://huseyincakir.freehostia.com/
> Blog: http://huseyincakir.wordpress.com/
> GoogleWave: huseyin.cakir35 at googlewave.com
> GoogleBuzz: http://www.google.com/profiles/huseyin.cakir35
> Twitter: https://twitter.com/huseyinCakir
> Alternative Mails: huseyincakir at iyte.edu.tr,
> huseyin.cakir at std.izmirekonomi.edu.tr
>
>
> LEGAL NOTICE:
> This e-mail, links and any files included are confidential and intended
> solely for the attention and use of the individual or entity to which it is
> addressed. If you are not the intended recipient you are notified that
> disclosing, copying, distributing or taking any action in reliance on the
> contents of this information is strictly prohibited.
>
> Please notify the sender immediately by e-mail if you have received this
> e-mail in error and permanently delete this e-mail and all its included
> files from your entire system immediately.
>
> WARNING:
> Computer viruses can be transmitted via e-mail and its included files. The
> recipient should check this e-mail and all included files for the presence
> of viruses. Hüseyin Çakır accepts no liability for any damage caused by any
> virus transmitted by this e-mail and its included files. E-mail
> transmission cannot be guaranteed to be secure or error-free as information
> could be intercepted, corrupted, lost, destroyed, arrive late or
> incomplete, or contain viruses. Hüseyin Çakır also does not accept any
> liability for e-mail messages sent to the addressee as a consequence of
> this e-mail message whether done so automatically or such requiring human
> intervention. The sender therefore does not accept liability for any errors
> or omissions in the contents of this message, which arise as a result of
> this e-mail transmission. Thanks for your attention.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20130919/5bc05774/attachment.html>


More information about the Gtk-sharp-list mailing list