Notifications
Clear all

[Closed] Can't get image buttons to display

 bks

Hello friends, I am back with another newbie question.

I have been following the Max help guide for the most part, but I am unable to get my image buttons to display. They either show as blank buttons, or just label buttons.

I have tried several methods aside from the one detailed in the help file. Please see here & here.

I know this topic has been covered a lot here, however the solutions I’ve used from search results here always return errors. I am not too sure where I am going wrong here, so I would really appreciate some help.

I have created 2 images for each of my buttons, one in colour, the other white with black background where I want transparency.

Snippet of my code for two buttons below.

group "Quick Meshes"(
	
	-- Image button setup
	
	-- Creates a plane in the center of the world
	button createPlane "Plane" across: 2 width: 30 height: 30 images:#("E:\\3D Modeling Resources\\Scripts\\BkS Quick Toolkit\\scripts\\images\\plane_i.bmp","E:\\3D Modeling Resources\\Scripts\\BkS Quick Toolkit\\scripts\\images\\plane_a.bmp", 1, 1, 1, 1, 1) align:#left
		
		on createPlane pressed do
	(
		plane length: 50 width: 50 lengthsegs: 1 widthseg: 1 isSelected:on pos:[0,0,0]
	)
	
	-- Creates a tube in the center of the world
	button createTube "Tube" width: 30 height: 30 images:#("E:\\3D Modeling Resources\\Scripts\\BkS Quick Toolkit\\scripts\\images\\tube_i.bmp","E:\\3D Modeling Resources\\Scripts\\BkS Quick Toolkit\\scripts\\images\\tube_a.bmp", 1, 1, 1, 1, 1) align:#right
	
		on createTube pressed do
		(
			tube()
		)
)

Thank you for being patient with me still very new to learning ms

4 Replies
 bks

Just a little bump.

Your code seems to be correct, at leas the part you posted, only thing that I can think of is that there is some problem with the images. Have you tried using different ones? Can I see them?

 bks

Here’s a link to the images within the code.

Thanks for helping me through this

Yes, I think the problem is that for buttons the alpha has to be white on the part you want to remove, it’s the opposite that it does for toolbar icons… @ZeBoxx2 explains it very well here and gives a possible workaround if you need a gray-scale alpha image: