[Gambas-user] make Label background from Database field

Doriano Blengino doriano.blengino at ...1909...
Sat Oct 17 17:07:58 CEST 2009


Vassilis A. Kanatas ha scritto:
> Thank you Doriano,
>
> I tested the code that you proposed and got the following error:
>
> "Type mismatch: wanted Label, got PictureBox instead"
>
> at line:
> For each alabel in Form1.Children (inside SUB change_bgcolor(...))
>
> I have put all 100 Labels on Form1 above from the picture that I placed
> on the Form. So it means that all Labels belong to the Form1.
>   
Ah... pardon me...

you should

    DIM alabel AS Object

instead of Label. I did not think that on the form there could be other 
objects... stupid uh? :-)

Sorry - make the modification and you should be ok.

Regards,

-- 
Doriano Blengino

"Listen twice before you speak.
This is why we have two ears, but only one mouth."





More information about the User mailing list