wnipun / holly-gtk-widgets

Automatically exported from code.google.com/p/holly-gtk-widgets
0 stars 0 forks source link

HSimpleList Items disappear and reappear on mouse over event #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create HSimpleList like this:
log_listing = HSimpleList()
log_listing.ItemHeight = 50

log_listing.SelectionType = Gtk.SelectionMode.Single

log_listing.OwnerDraw = true

log_listing.DrawItem += DrawItemEventHandler(self.on_draw_item)

// add to eventbox
log as Gtk.EventBox
log.Add(log_listing)

log.ShowAll()

2. Add some Items:
log_listing.Items.Add("Oh my god some error occurred.")
log_listing.Items.Add("Oh my god some other error occurred.")

3. make on_draw_item like:
def on_draw_item(obj as object, args as DrawItemEventArgs):

       item = log_listing.Items[args.ItemIndex].ToString()
    g = args.Graphics
    message = item

    bitmap = Bitmap("/path/to/some/png/image.png")

    bitmap_resized = Bitmap(bitmap, 40, 40)
    g.DrawImage(bitmap_resized, args.CellArea.X+5 , args.CellArea.Y+5)

    g.DrawString(message, Font("Arial", 12F), SolidBrush(Color.Black),
args.CellArea.X+60, args.CellArea.Y+10)

What is the expected output? What do you see instead?
Second item "Oh my god some other error occurred." appears and disappears
while moving over it with the mouse.

What version of the product are you using? On what operating system?
Holly dll from trunk
Ubuntu Linux Mono Runtime 1.9.1
GTK# 2.12.2

Please provide any additional information below.
Bug does not appear under Windows using .NET
Probably not due to a bug in Holly Widget but rather in GTK# or Mono?

Original issue reported on code.google.com by merowing...@gmail.com on 13 Dec 2008 at 8:06