Hi,


I'm trying to draw a picture (a small colored rectangle) in a hierarchical listbox.

I have written the following code that doesn't work, nor does it crash thought ;-)

  while not rs.eof
   lb_Consulting.Addfolder(rs.Field("Nom").Value)
lb_Consulting.CellTag(lb_Consulting.LastIndex,0) = rs.Field("ID_Consulting").IntegerValue

          dim icone as Picture
          icone = NewPicture(25,15,16)
          icone.Graphics.ForeColor = RGB(100,105,225)
          icone.Graphics.FillRect me.left,me.top,me.Width,me.Height
          icone=lb_Consulting.RowPicture(lb_Consulting.LastIndex)
          rs.MoveNext
   wend
   rs.close

The listbox is actually populated with datas from a RBSQL DB. The ultimate aim is to store the Color in a field of the DB as a string and to fill the icone (picture) with the appropriate color.

Thanks for any help,

Regards,

Youri
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to