Sign in to follow this  
Followers 0
CE101

Placement of Controls using Relative Positioning

7 posts in this topic

This is a follow-on to my earlier posting....

http://www.autoitscript.com/forum/index.php?showtopic=116116

As I explained, I've just begun using this program, so my apologies if I am asking a very foolish question...

I am writing a script that automates the creation of a fax log.

There's a GUI that contains a number of GUIControls (radios and buttons) as follows...

GUICreate("Export Type Selection", 500)

GuiCtrlCreateLabel("This script accomodates two types of exports, each with its own set of fields", 10, 10)

GuiCtrlCreateLabel("< TBD - More stuff to go here > ", 10, 40 )

GuiCtrlCreateLabel("Which one do you want? ", 10, 160)

GuiCtrlCreateGroup("Export Types", 10, 220, 140, 70)

$Radio_Export1 = GUICtrlCreateRadio(" Failed Fax Log", 20, 240, 120, 20)

$Radio_Export2 = GUICtrlCreateRadio(" Full Fax Log", 20, 260, 120, 20)

GUICtrlCreateGroup ("",-99,-99,1,1) ;close group

$Button1_Continue = GuiCtrlCreateButton("Continue", 100, 300, 120, 20)

$Button2_Quit = GuiCtrlCreateButton("Quit", 100, 320, 120, 20)

GUISetState()

I still have some more controls to add after line two, but I am finding it very tedious doing the positioning. Adding a control there may conflict with others.

I noticed a brief remark in one of the Help files hinting that there are better ways to do positioning.

Can you please explain what they mean.

Can you give me an example.

Perhaps you can touch up my code accordingly.

Any suggestions would be greatly appreciated.

Gary

Share this post


Link to post
Share on other sites



Welcome to the forums

Please stay in the same thread and wait for a reply instead of starting new threads. You were given an answer in your previous topic.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

If I am understanding you correctly, you want a better way of designing the GUI interface, correct? You can use Koda to lay out your interface.

http://www.autoitscript.com/forum/index.php?showtopic=32299


#include <ByteMe.au3>

Share this post


Link to post
Share on other sites

Hi sleepydvdr:

Thank you for your help.

Share this post


Link to post
Share on other sites

Relative positioning is covered.

Opt("GUICoordMode", 2)

When using it, you should familiarize yourself with GUISetCoord() at the same time, it will save you from those awkward situations like creating a group and then wanting the next set of controls inside the group not positioned relative to the group.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Hi GEOSoft:

Thank you very much for the comments you added to this thread on June22.

I'm afraid I haven't seen your material till now - I forgot to set "email notification" on my posting.

Sorry about that.

Share this post


Link to post
Share on other sites

No problem.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
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
Sign in to follow this  
Followers 0