Jump to content

Recommended Posts

Posted (edited)

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:

  Reveal hidden contents

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
Posted

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.

  Reveal hidden contents

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

Posted (edited)

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.

  Reveal hidden contents

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

Posted (edited)

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
Posted

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:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 1/13/2015 at 10:01 PM, mLipok said:

 

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. 

  • Moderators
Posted
  On 1/13/2015 at 11:09 PM, jaberwacky said:

A program called ByHand.exe.  :P

:lmao:

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted (edited)
  On 1/13/2015 at 11:45 PM, jaberwacky said:

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.

  Reveal hidden contents

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

Posted (edited)
  On 1/14/2015 at 11:13 AM, TheSaint said:
If you have done anything significant, then you should add your name as a contributor, just as Roy and I did.
Done.
 
  Quote
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.

  Quote
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?

  Quote
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
Posted
  Quote

 

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.

  Reveal hidden contents

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

Posted (edited)

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
Posted
  On 1/17/2015 at 2:03 PM, jaberwacky said:
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.

  Reveal hidden contents

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

Posted

@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.

  Reveal hidden contents

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

Posted

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.

  Reveal hidden contents

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

Posted
  On 1/19/2015 at 9:33 AM, TheSaint said:

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.

Posted (edited)

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

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
×
×
  • Create New...