Xojo Conferences
XDCMay2019MiamiUSA

[MBS] Can't manage to have folderItem.DrawIconMBS to work in ListBox... (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] Can't manage to have folderItem.DrawIconMBS to work in ListBox... - Addendum
Next thread: Re:[MBS] 3.1pr11 (CMYK Example)


Re: [MBS] MIDI Destinations and External Devices   -   Ron Benditt
  [MBS] Can't manage to have folderItem.DrawIconMBS to work in ListBox...   -   daniel chiaramello.net

[MBS] Can't manage to have folderItem.DrawIconMBS to work in ListBox...
Date: 17.04.03 10:22 (Thu, 17 Apr 2003 11:22:30 +0200)
From: daniel chiaramello.net
Hello.

I have a problem in trying to draw an icon in a Listbox cell...

I have the following code:

Function CellTextPaint(g as Graphics, row as Integer, column as integer, x as Integer, y as Integer) as Boolean
Dim f as FolderItem

// CurrentPath is a valid Folder folderitem at that point
if columnthen
// Get the file name in the hidden column of my listbox
f = CurrentPath.Child(me.Cell(row, 4))
if f=nil or not f.exists then
g.Drawstring "<>", 4, 10
else
// I go through there, I'm sure of that...
f.DrawIconMBS(g, 0, 0) // I don't see any drawing...

// I also tried the following and some others:
// f.DrawIconMBS(g, 16, 16)
// f.DrawIconMBS(g, 32, 32)
end if
return true
end if
End Function

I tried different x,y positions for the f.DrawIconMBS call, but none of the ones I tried had a result. I tried by overdimensioning my cell, to see it is was drawn in some exotic place, but nope... What's wrong?

Thanks for your attention,
Daniel.