Jump to content

Detect if GUI control is outside of GUI hight/width


AcidCorps
 Share

Recommended Posts

I want to have a gui that will have a few dynamics and can run on different computer resolutions.

What i need to do is to be able to detect if a GUI control is outside of the height or width of the gui

the starting of the gui will be

GuiCreate("My Gui", $iWidth, $iHeight, $iLeft, $iTop)

$iWidth = @DesktopWidth /2

$iHeight = @DesktopHeight /2

$iLeft = $iWidth - ($iWidth /2)

$iTop = $iHeight - ($iHeight /2)

so the size of the gui will depend on the size of the screen so if GuiCtrlCreateInput is below the gui I want it to be moved to a new tab

Edited by AcidCorps
Link to comment
Share on other sites

I want to have a gui that will have a few dynamics and can run on different computer resolutions.

What i need to do is to be able to detect if a GUI control is outside of the height or width of the gui

the starting of the gui will be

GuiCreate("My Gui", $iWidth, $iHeight, $iLeft, $iTop)

$iWidth = @DesktopWidth /2

$iHeight = @DesktopHeight /2

$iLeft = $iWidth - ($iWidth /2)

$iTop = $iHeight - ($iHeight /2)

so the size of the gui will depend on the size of the screen so if GuiCtrlCreateInput is below the gui I want it to be moved to a new tab

I'm no expert on this aspect, but my approach when I've written programs that need as much room as possible is to design all the controls for the smallest screen I think it's worth dealing with. (I choose 80 x 600). I set certain controls to be docked to the side or combination of sides as I want so that they will move or expand depending on the setting. Then all you have to do is to set the window size to suit the screen and the control positions are automatically set.

My recommendation is to avoid changing the design depending on screen resolution; imagine writing a help file with screen shots to support it?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...