[Gambas-user] extended Combobox
Daniel Quintero
dquinter at ...626...
Mon May 26 19:41:36 CEST 2014
Yes, I only cut&paste from that message :D
*_________________________*
*Lic. Daniel Quintero Rojas*
*¡Saludos desde México!________*
On Mon, May 26, 2014 at 12:03 PM, Karl Reinl <karl.reinl at ...9...> wrote:
> Am Montag, den 26.05.2014, 09:52 -0500 schrieb Daniel Quintero:
> > I use this code (Obviously, without creating a custom combo):
> >
> > ' aIDs is an array of Integers, and you can assing that array to a
> Variant
> > variable,
> > ' as is the case of the Tag property of the combobox.
> >
> > Public Sub LoadCombo()
> > Dim aIDs As New Integer[]
> > Dim sQuery As New String
> >
> > cboSample.Clear
> >
> > ' Load Data
> > hResult = $hConn.Exec("select ID, desc from MyTable")
> > For Each hResult
> > cboSample.Add(hResult!desc)
> > aIDs.Add(hResult!ID)
> > Next
> > cboSample.Tag = aIDs
> >
> > End
> >
> > Public Sub cboSample_Change()
> > If cboSample.Index > -1 Then
> > Message("ID associated with '" & cboSample.Text & "': " &
> > cboSample.Tag[cboSample.Index])
> > Endif
> > End
> >
> > Regards
> >
> > *_________________________*
> > *Lic. Daniel Quintero Rojas*
> >
> > *¡Saludos desde México!________*
> >
> >
> >
> > On Sun, May 25, 2014 at 2:12 PM, Karl Reinl <karl.reinl at ...9...>
> wrote:
> >
> > > Salut,
> > >
> > > I need an extended Combobox,
> > > no sorry I would like to have an extended Combobox,
> > > where I can add elements like
> > > .Add(Item AS String[,key AS Variant]),
> > > does anybody made that yet, and want to share ?
> > >
> > > --
> > > Amicalement
> > > Charlie
> > >
>
> Salut Daniel,
>
> thanks for that code, I knew it because in a similar case you gave it to
> the list
>
> --
> Amicalement
> Charlie
>
>
>
> ------------------------------------------------------------------------------
> The best possible search technologies are now affordable for all companies.
> Download your FREE open source Enterprise Search Engine today!
> Our experts will assist you in its installation for $59/mo, no commitment.
> Test it for FREE on our Cloud platform anytime!
>
> http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk
> _______________________________________________
> 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