frame

UIView frame, bounds and center

血红的双手。 提交于 2019-11-25 23:26:16
问题 I would like to know how to use these properties in the right manner. As I understand, frame can be used from the container of the view I am creating. It sets the view position relative to the container view. It also sets the size of that view. Also center can be used from the container of the view I\'m creating. This property changes the position of the view relative to its container. Finally, bounds is relative to the view itself. It changes the drawable area for the view. Can you give more

Switch between two frames in tkinter

余生长醉 提交于 2019-11-25 22:14:29
问题 I have built my first few scripts with a nice little GUI on them, as the tutorials have shown me, but none of them address what to do for a more complex program. If you have something with a \'start menu\', for your opening screen, and upon user selection you move to a different section of the program and redraw the screen appropriately, what is the elegant way of doing this? Does one just .destroy() the \'start menu\' frame and then create a new one filled with the widgets for another part?

How to initialize properties that depend on each other

点点圈 提交于 2019-11-25 21:42:54
问题 I want a picture to move to the bottom. If I press a button the pic should move down by 1. I added the picture and a button: var corX = 0 var corY = 0 var runter: UIButton = UIButton.buttonWithType(UIButtonType.System) as UIButton var image = UIImage(named: \"panzerBlau.jpg\"); var panzer = UIImageView(frame: CGRectMake(corX, corY, 30, 40)); // override func viewDidLoad() { super.viewDidLoad() panzer.image = image; // self.view.addSubview(panzer); // runter.frame = CGRectMake(100, 30, 10 , 10