Dimitri it worked !!

I put the code that you suggested and it works only when I put a number 
smaller than rsThesi.Count . For example when I put 10 it shows 10 Labels 
coloured !

I ' m writing down the code that worked:

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 < 10
         change_bgcolor(CInt(rsThesi!thesi))
         rsThesi.MoveNext()
   LOOP
END

PUBLIC SUB change_bgcolor(pos AS Integer)
   SELECT CASE pos
        CASE 1
          Label1.Background = Color.Red
        CASE 2
          Label2.Background = Color.Red
        CASE 3
          Label3.Background = Color.Red
        CASE 4
.......up to CASE 100 !!!!!!!!!!!!
        CASE ELSE
  END SELECT
END



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to