[Gambas-user] make Label background from Database field
Vassilis K
vkan53 at ...2300...
Sun Oct 18 20:38:38 CEST 2009
After the function of change_bgcolor that existed and Benoit reminded us, the
code is becoming more sophisticated:
PUBLIC SUB Form_Open()
DIM rsThesi AS Result
DIM iTemp AS Integer
DIM sTemp AS String
MODMain.Connect()
rsThesi = MODMain.$Con.exec("select * from egrafes where elenchosAnax = 0
AND thesi <> 0 ")
DO WHILE rsThesi.Index < rsThesi.Count - 1
change_bgcolor("Label" & CInt(rsThesi!thesi))
rsThesi.MoveNext()
LOOP
END
SUB change_bgcolor(labelname AS String)
Form1[labelName].Background = Color.Red
END
More information about the User
mailing list