[Gambas-user] Modifying a picture assigned to a menu

David Dell davidmdell at ...626...
Fri Nov 27 21:37:45 CET 2009


Let's say first I assign a picture to a menu:

  DIM Pic AS Picture
  Pic = NEW Picture(18, 18)
  Pic.Fill(Color.Black)
  MenuCustomColor.Picture = Pic

When I try to modify a picture assigned to a menu, if I use

  MenuCustomColor.Picture.Fill(Dialog.Color)

it does not do anything.

Instead I have to do:

  DIM Pic AS Picture
  Pic = MenuCustomColor.Picture
  Pic.Fill(Dialog.Color)
  MenuCustomColor.Picture = Pic

Why is that?

And is this the correct way to do this?

Thank you,
David




More information about the User mailing list