[Gambas-user] make Label background from Database field
Vassilis K
vkan53 at ...2300...
Fri Oct 16 20:11:55 CEST 2009
Since I did not want to make labels on run time, I got a solution to show red
color as following:
PUBLIC SUB Form_Open()
DIM i AS Integer
DIM rsThesi AS Result
DIM iD AS Long
MODMain.Connect()
rsThesi = MODMain.$Con.exec("select * from egrafes where elenchosAnax =
0")
WHILE iD < rsThesi.Count
SELECT CASE rsThesi!thesi
CASE 1
Label1.Background = Color.Red
CASE 2
Label2.Background = Color.Red
CASE 3
Label3.Background = Color.Red
..........................etc up to Label100
END SELECT
INC iD
WEND
MODMain.$Con.Commit()
END
This solution shows only the first found Label (or rsThesi.thesi value) as Red
the others remain uncolored even though they have number values as 10, 25 etc.
I thing there is an error on the loop and it stops at the first found number
of the field rsThesi!thesi.
Any suggestions?
More information about the User
mailing list