Created
June 18, 2012 12:39
-
-
Save DinisCruz/2948192 to your computer and use it in GitHub Desktop.
O2 Script to test GUI Height issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var t = "test".popupWindow(400,40); | |
| return "{0} - {1}".info(t.height(), t.width()); | |
| //return "{0} - {1} which is a {2}".info(t.Height, t.Width, t.GetType().FullName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var t = "test".popupWindow(400,40); | |
| //t.closeForm_InNSeconds(4); | |
| var form = t.parentForm(); | |
| form.invokeOnThread( | |
| ()=>{ | |
| form.ClientSize = new Size(400,40); | |
| }); | |
| //panel.add_PropertyGrid().show(t.parentForm()); | |
| return "Control: {0} - {1} \nForm: {2} - {3}".info(t.height(), t.width(), form.height(), form.width()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static Form clientSize(this Form form, int width, int height) | |
| { | |
| return (Form)form.invokeOnThread(() => | |
| { | |
| form.ClientSize = new Size(width, height); | |
| return form; | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var t = "test".popupWindow(400,40); | |
| t.parentForm() | |
| .wait(1000) | |
| .clientSize(400,400) | |
| .wait(1000) | |
| .clientSize(500,100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment