[Solved] How to resize texture after resizing box node with gui.set_size()?

I am trying to build a little pop-up menu for the game I’m working on:
image

The frame is a box node with a 9-slice texture set to manual size mode in the editor that provides the background of the menu:
image

When displaying the menu I calculate the size of all the labels I’m adding (by copying item_prototype) and then try to resize it as follows:

gui.set_size_mode(self.frame, gui.SIZE_MODE_MANUAL)
gui.set_size(self.frame, vmath.vector3(frame_width * 2, frame_height, 1))

I don’t think the first line should be necessary, but without it I get log output WARNING:GUI: Can not set size on auto-sized nodes.. With it the size seems to be adjusted, but the texture seems to stay the same size:
image

Is there a way to get it to resize ? Sorry, I couldn’t figure this out from the documentation or Google.

I guess your self.frame is not refering to a correct node

1 Like

Excellent guess, thank you!

I was referring to popup instead of to frame:see_no_evil: