[Gambas-user] Adding "not in list" item to a combobox

Olivier Cruilles linuxos at ...1896...
Sun Apr 10 10:45:50 CEST 2011


Maybe, your problem is that you don't now how to acces to the ComboBox property from the sub Form ?

If it that, you can create property in your main form to acces to to ComboBox like that


PROPERTY AddItem as string

PRIVATE SUB AddItem_Write(Value as String)

	IF ComboBox1.Find(Value) = -1 then
		ComboBox1.Add(Value)
	END IF
END

PRIVATE SUB AddItem_Read() AS String

	' What you want to return, but it's not really important
	RETURN ""

END


Olivier Cruilles
Mail: linuxos at ...1896...

Le 10 avr. 2011 à 10:12, Bill-Lancaster a écrit :

> 
> 
> No problem,
> 
> 1) A form is opened with a combobox on it
> 2) The combobox is filled with a list on form_open
> 3) The user can't see what he wants in the list so I want him to be able to
> add a new item
> 
> As I mention above, using the activate event works on the main form but not
> in a sub form.
> 
> Whats more, I created another subform but this time not checking "Dialogbox
> management" and the activate event fires properly
> 
> Bill Lancaster
> -- 
> View this message in context: http://old.nabble.com/Adding-%22not-in-list%22-item-to-a-combobox-tp31362490p31362684.html
> Sent from the gambas-user mailing list archive at Nabble.com.
> 
> 
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 






More information about the User mailing list