I create a button and place some labels and some images on the button frame. But when I try to click on the button I can only execute the button command by clicking on the black background of the button.
Is it possible to click through the images and the labes so the button command is still executed when I click on those objects?
Screenshot of my button:
Here is the code for my button:
w = 1.0
h = 0.4
frame = DirectButton(scale=1, frameColor = (0,0,0,1), frameSize = (-w/2, w/2, -h/2, h/2), pos = (0,0,0), command = test)
item_name = DirectLabel(parent = frame, text="ItemName1 or Family1", text_align = TextNode.ALeft, scale=0.05, text_bg = (0,0,0,1), text_fg = (1,1,1,1), pos = (-w/2 + 0.05, 0, h/2 - 0.08))
label1 = DirectLabel(parent = frame, text="Medium blabla bla", text_align = TextNode.ALeft, scale=0.05, text_bg = (0,0,0,1), text_fg = (1,1,1,1), pos = (-w/2 + 0.2, 0, h/2 - 0.2))
label2 = DirectLabel(parent = frame, text="High blabla bla", text_align = TextNode.ALeft, scale=0.05, text_bg = (0,0,0,1), text_fg = (1,1,1,1), pos = (-w/2 + 0.2, 0, h/2 - 0.3))
icon1 = DirectFrame(parent = frame, image = "img/fl27.png", scale = 0.04, pos = (-w/2 + 0.1, 0, h/2 - 0.2))
icon2 = DirectFrame(parent = frame, image = "img/fl27.png", scale = 0.04, pos = (-w/2 + 0.1, 0, h/2 - 0.3))