Jump to content

GuiBuilderNxt - Reboot [08/18/2016]


jaberwacky
 Share

Recommended Posts

This is an update to GuiBuilder (CyberSlug, Roy, TheSaint, and many others) to run on the latest AutoIt Beta release.
 
For a chronological history of GuiBuilder and other GUI designers see: >AutoIt GUI Creators (Designers).

The seed of this effort is >here.

Note: This is early stage software.  Please help by reporting issues.

-----------------------------------------------------

Now for the latest exciting installment!  Tabs are now available!  One tab can be added to the GUI.  Move it, resize it, and right click to add a new tab item!  More context menu items on the way.  Also upcoming is the ability to be able to add controls to each tab item.

---------------------------------------------------------

GUIBuilderNxt - Reboot.zip - Exe included.

dl: 4286

Changelog:

Spoiler

[08/18/2016]

1) Tabs can now be added, resized, and moved.  Right click context menu allows the addition of new tab items.

[07/08/2015]

A 1) Worked out some silly bugs which caused crashes.

[03/7/2015]
    A 1) Shift + Drag now works for multiple selected controls.
      2) The text, left, top, width, and height of multiple selected
         controls can now be adjusted via the properties window.
      3) Better code generation.
      4) The issues with the Main tab in the properties window have been sorted out.
      5) General UI improvements and bug fixes.

[02/26/2015]
        A 1) Updown control seems to be fully supported now.  Now I just gotta work on tab controls.
                    2) Worked out some more control selection issues.
                    3) New feature: copy a control by holding shift while dragging.  May have a few issues.
        B 1) Shift + Drag to copy should be more consistent now.

[02/25/2015]
    A 1) Changed selection code per mLipok's request.
            2) Hopefully fixed as reported by Andreik.

    Thanks to everyone for their reports and input!

[02/23/2015]
    A 1) Grid background is now a graphic control.  Now it resizes to fit the gui. Thanks to UEZ for the >code!
            2) Drag and drop code replaced with Melba23's >code.
      3) Pasting multiple controls seem to work consistently now.
    B 1) Right clicking listviews should work correctly now.
      2) Right clicking controls should work in general now.

[02/20/2015]
    D 1) Syntax error per mLipok.
    C 1) Minor issue.
    B 1) Bug fix per mLipok.  Hard crash when deleting multiple controls.
    A 1) Copy, Paste and Delete multiple controls at once.
       2) Other multiple selection bugfixes, and I should start keeping track of specifics.

[02/13/2015]
    A - 1) Double click a group to select the group and its contents!  Thanks to MrCreatoR for his >MouseSetOnEvent UDF.
    B - 1) Double clicking should work consistently now.  I had messed up while trying to strip MouseSetOnEvent to only what I needed.

[02/12/2015]
    A - 1) Fixed more multiple selection bugs.
        2) Fixed paste issue where control is not at proper location.
        3) Rearranged control properties tab.  Tell me what you think.
    B - 1) Fixed issue with wiping the gui clean.
    C - 1) Fixed issue with selected control.
    D - 1) Fixed some issues because I forgot to run Au3Check.  Used AU3Stripper for a smaller exe.
    E - 1) Fixed an issue with window resizing.
    F - 1) Fixed an issue with selecting a group and its controls.
                2) Snap to grid is back to ten again.
    G - 1) Fixed issue with checkbox and radio controls being 1 pixel tall.

[02/10/2015]
    A - 1) Implemented a method of selecting multiple controls by using a selection rectangle.
                2) Moving the properties window into the toolbar window.
                3) Fixed several bugs here and there.
                4) Leaving the Text field blank in the Main tab of the properties tab will not create a
                     variable for that control during code generation.

[02/08/2015]
    A - Worked out a lot of individual and multiple control selection, moving, resize bugs.  Made some (very) small progress on tab controls.
    B - More multiple selection bugs squashed.  Fit to width customized to more controls.
    C - Resizing the window will snap to nearest fifth.

[02/05/2015]
    A - Ability to select and move multiple controls at once.  Buggy but workable. Let me know of any problems. Select multiple controls by holding
                down Ctrl and left clicking controls.
    B - Move a Group to move all controls contained therein.  Hold down Ctrl when selecting the group.
                Press Esc to close the Control Properties window (mLipok).
    C - Fixed some issues regarding moving controls with a Group.
    D - Fixed issues with selecting multiple controls.
    E - More multiple selection bugfixes.

New Features and fixes:
1) Show or hide control while moving or resizing control. *Currently bugged out*
2) Option to show controls which have had their state set to hidden.
3) Properties window for each control as they are selected.  This makes fine tuning a control easier.
4) A button which will resize a control's width to fit the text.  Uses Melba23's _StringSize library.
5) Remembers settings from the last session.
6) GuiOnEvent mode.  CyberSlug made mention of wanting to do this in the early days of GuiBuilder.
7) Maps rather than multidimensional arrays.
8) Consistent control naming, (i.e., instead of Group1, Button2, Button3, Radio4 it would now be Group1, Button1, Button2, Radio1).
9) Restructured the menubar layout per GuiBuilder Resurrected.
10) Hotkeys switched to accelerators.
11) Option to wipe the gui clear to the Edit menu.
12) Select and move multiple controls at once by holding down Ctrl or using a selection rectangle.
13) Copy, Paste and Delete multiple controls at once.
14) Solid grid background that now resizes to fit the GUI.
 
Roadmap:
1) Get the Tab control to work correctly. *Still in progress*
2) Finish adding properties settings to the control properties window.
3) Make the code generation produce code with a better layout.
4) Common GUI templates.  Ability to make your own templates too.
5) Select multiple controls and use arrow keys (or other method?) to snap the selected controls to align to the chosen edge.
6) Visual hints to tell you when you're within so many pixels from the edge of the window or control.  Mimics the gui designer of Visual Basic.
7) Double click a control to edit the text.
8) Visual hints to indicate selected controls, etc.
9) Ability to create and store custom controls.
 
Known issues:
1)Many!

Edited by jaberwacky
Link to comment
Share on other sites

No worries, will check it out. :thumbsup:

I had started to change the indents to proper tabs, but didn't get far yet .... no further than in the last one you've modified, probably.

I won't do anything more now (checking etc), until I've finished doing some tests with another program I'm working on. ;)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

For those who may have missed it, this topic was a split-off from a discussion >here.

(see the bottom few entries of the prior page, for the beginning of the discussion)

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

OK.  I have spent some more time refactoring this script.  In most peoples eyes this would no longer be a simple script but if you hear me out, it isn't that bad.  I have broken the script into three modules.  The main GUIBuilder, a view, and a model.  GUIBuilder is where the main message loop lives.  It determines the users actions and then behaves accordingly.  The view contains the variables and functions that are necessary to maintaining the GUI.  The model contains the variables and functions necessary to maintain the program's state.  I have also moved the changelog comments to a readme.

There is an error that occurs for me when I click on the Group control creation button on the left.  The program will hardcrash.  I believe I have located the source of the error to _CreateCtrl function.  I haven't dug deeper than that yet.

attachment=45949:GUIBuilder.zip 8 downloads

Edited by jaberwacky
Link to comment
Share on other sites

I think you can change this line:

MsgBox(64, "About " & $program_name, $program_version & " - created by CyberSlug, " & @LF & "and modified by Roy and TheSaint!")

btw.

How you Tidy your script in this way:

Global $menu_settings = GUICtrlCreateMenu("Settings")
Global $showGrid      = GUICtrlCreateMenuItem("Show grid",               $menu_settings)
Global $gridSnap      = GUICtrlCreateMenuItem("Snap to grid",            $menu_settings)
Global $pastePos      = GUICtrlCreateMenuItem("Paste at mouse position", $menu_settings)
Global $showHidden    = GUICtrlCreateMenuItem("Show hidden controls",    $menu_settings)

Global $menu_properties      = GUICtrlCreateMenuitem("Properties",     -1)
Global $menu_exit            = GUICtrlCreateMenuitem("Exit",           -1)
Global $menu_about           = GUICtrlCreateMenuitem("About",          -1) ; ADDED by TheSaint
Global $menu_save_definition = GUICtrlCreateMenuitem("SaveDefinition", -1) ; Roy add-on
Global $menu_load_definition = GUICtrlCreateMenuitem("LoadDefinition", -1) ; Roy add-on
Global $menu_info            = GUICtrlCreateMenuitem("Info",           -1) ; ADDED by TheSaint
Global $menu_vals            = GUICtrlCreateMenuitem("Vals",           -1) ; ADDED by TheSaint

Global $firstControl = 1 + $background

GuiCtrlSetState($contype[1], $GUI_CHECKED) ; initial selection

GUICtrlSetState($showGrid,   $GUI_CHECKED)
GUICtrlSetState($gridSnap,   $GUI_CHECKED)
GUICtrlSetState($pastePos,   $GUI_CHECKED)
GUICtrlSetState($showHidden, $GUI_CHECKED)

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

 

I think you can change this line:

MsgBox(64, "About " & $program_name, $program_version & " - created by CyberSlug, " & @LF & "and modified by Roy and TheSaint!")

There is no word on whether my changes will become official.  I consider TheSaint to be the main authority on GUIBuilder due to his continued interest and his status as an MVP. 

Link to comment
Share on other sites

There is no word on whether my changes will become official.  I consider TheSaint to be the main authority on GUIBuilder due to his continued interest and his status as an MVP. 

Just because I'm likely the only one still using it, doesn't mean I'm any kind of authority or expert ... and my interest is probably unhealthy or hillbillyish ... backward. Still, I like what you say ... so you can be my friend any day.

I haven't really had the time to look at it properly yet, this time around, and when last I did (many years ago) it was a headache, but I persevered and got it to what it needed to be back then.

If you have done anything significant, then you should add your name as a contributor, just as Roy and I did.

If you can get it working in WIN 7 and beyond, then I for one will be grateful, as it would be something I would eventually need to address myself ... and I probably have enough projects happening. If I did address it though, this time around, being wiser and smarter and more experienced, I'd probably rewrite it the way I code now ... if just to help me better understand what is going on.

Working with most other people's code, is not one of my strong points, and up until now (as messy as it is) I have tried to stay faithful to its original state as conceived by the legendary CyberSlug ... somewhat like you would with a vintage car etc.

At the time CyberSlug wrote the program, it was pretty revolutionary and very well received, but no doubt needs more than a grease and oil change now.

P.S. Have you checked out the other versions and spinoffs? Some of those got quite complex and added missing features etc. I always had trouble getting them to run ... memory hungry for the time, I think.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

If you have done anything significant, then you should add your name as a contributor, just as Roy and I did.
Done.
 
I'd probably rewrite it the way I code now ... if just to help me better understand what is going on.

Me too.  Also, I have decided that whatever code I bundle with SciTECustomizationGUI has to meet certain standards and best practices.

Working with most other people's code, is not one of my strong points

Is that your fault or the fault of the code writer?

Have you checked out the other versions and spinoffs?

Nah.  I might when I work out the current issues.

 

Without furthur adieu, the latest version is now better structured.  More things are in functions.  $grippy[1 - 8] have been replaced with $NorthWest_Grippy, etc. Also, fixed the issue that caused a crash when selecting certain control creation buttons by upping the $MCL array to its maximum amount of elements.  It is a hack though.

My ultimate goal for this version is to modularize every aspect.  I want me and others to be able to go into the code, find what they are looking for and not have to wade through a bunch of other unrelated code.

Here is the very brief changelog: Major structural rearrangements and code refactoring.  Fixed labels displaying "foo" to now display the proper names. Fewer magic numbers.  Less global variables. Converted from HotKeys to Accelerators. Resized the GUI and changed the starting location.

Edit: OOPS, turns out I haven't been zipping up everything else!

attachment=45956:GUIBuilder.zip

prev: 19

Edited by jaberwacky
Link to comment
Share on other sites

 

Is that your fault or the fault of the code writer?

Wouldn't I like to just say the other coder.

The truth is, it could be either or .... or both.

I can lack understanding, due to my lack of skill.

I can lack willingness to do the hard yards ... I may suspect I lack the skill ... but it could just be laziness or lack of drive.

The lack of willingness, could also be because of messiness of the other coder or just the difficulty in understanding the way the other coder thinks or formats things. I may even disagree with their formatting, variable naming etc, which could then put me off.

I'll put the effort in (eventually) if i really need to, regardless.

At the end of the day, it can just be whether I'm in the mood for a challenge or feel like learning something.

I do predominantly code for practical reasons, then perhaps because of boredom and maybe even fun.

I'm also always doing some kind of programming, if just a little update to the large stable of programs I now maintain and regularly use. They will generally always take precedence over the troubleshooting of somebody else's code.

Thanks for your effort.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Latest version.  Made very decent progress, you could probably use this though I'm sure the menu functions and the hotkeys aren't working correctly yet.

Includes an exe for those of you without the latest beta.

attachment=45981:GUIBuilder.zip

dl: 29

Edited by jaberwacky
Link to comment
Share on other sites

Includes an exe for those of you without the latest beta.

That would be me.

Thanks.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

@jaberwacky - Just had a little play with the EXE, finally, and found it crashes when I try to use Properties to rename the text of a control.

Did you look at the changes in my last upload here, where I fixed that?

I just re-tested mine, and they work fine.

P.S. That was the version I uploaded >here, back at the original topic, before the split-off. I don't recall commenting everything I did, so you may need to check using a program like FileCompare. I'd been meaning to get back to things before now, but you seemed to have it all in hand, and I've been distracted by other things.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Ok as far as I can tell this version has all of the original features but now works on W7. 

exe included: attachment=45998:GUIBuilder.zip dl: 3

Edited by jaberwacky
Link to comment
Share on other sites

Very good. :thumbsup:

Simple quick test worked for me. :D

Thanks! :bye:

P.S. Of course, now that you've done all that, and are still enthused, you could look at adding the missing and/or disabled elements. ;) ;)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Very good. :thumbsup:

Simple quick test worked for me. :D

Thanks! :bye:

P.S. Of course, now that you've done all that, and are still enthused, you could look at adding the missing and/or disabled elements. ;) ;)

Nice!  Thanks.

I will look into it but I will break from it for a while though.

Link to comment
Share on other sites

Got a working proof of concept working for tab controls.  Very basic, can't move or resize the control.  I'm thinking about making it so that tab items can be added to a tab control by right clicking the control and choosing to add a tab item.  I got even just this far by studying '?do=embed' frameborder='0' data-embedContent>>.

attachment=46008:GUIBuilder.zip dl: 22

Edited by jaberwacky
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

×
×
  • Create New...