[Gambas-user] Dynamic objects

Rodney Rundstrom iecltd at ...2113...
Fri Mar 27 07:13:42 CET 2009


Thanks I now can dynamically create object not sure where the me in
Textbox(me) come from but it all works well


-----Original Message-----
From: M0E Lnx [mailto:m0e.lnx at ...626...] 
Sent: Wednesday, 25 March 2009 2:03 a.m.
To: mailing list for gambas users
Subject: Re: [Gambas-user] Dynamic objects

I have no experience with mysql at all, but you can easily create this
textbox

PUBLIC SUB Read_DBASE()
DIM sList as string
DIM sResults as String[]
DIM tb as TextBox
DIM sItem as String
DIM i as integer
dim y as integer

' This is where you get your values from mysql and let's assume you
put them into a raw string (sList)

' After that you creat an array with the results
sResults = split(sList," ") ' or however your values may be separated

FOR i = 0 to sResults.Max
tb = new TextBox(me) as "Textbox"
WITH tb
.Text = sResults[i]
.width = 100
.height = 24
.x = 4
.y = y
END WITH
y = y + tb.height + 4
NEXT

END

----------------------------------------------------------------------------
--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
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