Buttons with an image not text

Hi Everyone,
Please excuse me for being a total noob, but I can promise that I’ve looked everywhere in the forum and the wiki database and have been unable to find the answer.

I know how to make a button:

    Blender.Draw.Toggle("TextDisplayed",1,10,20,100,20,0,"This does something")

But How can I get it to show an image, instead of the text “TextDisplayed”?

Also, if I wanted it to merge two verts in the same way pressing Alt M does, where would I find the Python command that Alt M triggers… or have I got the wrong end of the stick with that one?

For the Bitmap: The short answer is that there is no ready made solution. The longer solution is to use the BGL module and you can code your own button.

Another pseudo-solution would be to use the Image() function in the Draw module and draw it over a button you’ve created. It might even be possible to manipulate it’s colors so that you can have it ‘react’ to button presses.

For the alt-m: You would have the user select vertexes. Get their location and indexes, and what other vertexes they are connected to (for each of the selected vertexes, which can be obtained via edge data). Create a new vertex at the new location, delete the other ones, and then rebuild the edges using the data you got before.

I realize that was a rough overview, so if you’d like more info, let us know.