From: Jonatan L. <th...@ho...> - 2004-05-17 12:20:16
|
Hey! Wasn't this what you were looking for earlier? w = applet.Applet(sys.argv[1]) panel_height = w.socket.get_geometry()[3] - 4 Then you have the panel height and can use that value when setting the size of your applets... You should also check the direction of the panel so that you can use panel_width when panel is vertical... It seems like get_geometry() returns width == 1 for horizontal panels and height == 1 for vertical ones, so maybe a quick check would just be: (width, height) = w.socket.get_geometry()[2:4] if width == 1: direction = HORZ; panel_size = height - 4 else: direction = VERT; panel_size = width - 4 Much easier than checking those size request events and all what you were talking about.. =) /Jonatan - [ http://kymatica.com ] |