Jump to content

GuiBuilderPlus [updated March 24, 2024]


Recommended Posts

Looks very promising, so I will give it a whirl. :) 

Thanks for your work and sharing.

I've added it to the Gui Creators topic.

I have a personal preference for Case $msg = $Button_1 for instance, which you could maybe support.

Keep up the good work.

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

Now that the "Name" property is working properly, I added the underscore back in as the default name.

Funny thing is when I was blasting things out here and there and took the underscore out of the generated code I even thought to myself, "This looks like someone put this here intentionally. Should I keep it?" Obviously I didn't.. whoops! 😁

Anyway, it'll be there in the next revision along with a few bug fixes I've found.

Link to comment
Share on other sites

First post updated with version v0.2 for several new features and bug fixes!

Spoiler
  • ADDED: Object Explorer window to display the list of objects (view, select, and delete from list)
  • ADDED: Last tool stays selected for multiple creation. Clicking away stops drawing.
  • ADDED: "_" back for default control names
  • FIXED: Issue with controls getting mixed up while deleting
  • FIXED: More intuitive/responsive clicking on and away from controls
  • FIXED: Graphic glitch when creating a new combobox
  • FIXED: Graphic glitch when clearing all controls
  • FIXED: Updown control invalid generated code
  • FIXED: Weird selection behavior when Updown control exists
  • FIXED: Pic control not showing the bitmap on drawing or generated GUI
  • FIXED: View Code dialog state not saved when clicking close[X] button
  • Other: Changed default text from Button1 to Button 1 (space)

 

Link to comment
Share on other sites

First post edited for a fresh set of updates and bug fixes in v0.21!

I started reorganizing the generated code to fit my style and hopefully provide a cleaner output. Feedback welcome, and we'll see if we can merge our ideas, or not.
You can now create a template file to customize how you want your function comments to looks. Hopefully this will inspire people to document their code as they go.

I also added a "duplicate" feature, which is something I find to be very useful already.
 

List of changes:

Spoiler
  • FIXED: object explorer and code viewer not updated after .agd load
  • FIXED: object explorer not updated after copy/paste
  • FIXED: properties not disabled after finish drawing (also caused property crash)
  • FIXED: All "Main" properties now function properly - other tabs still not implemented yet (will most likely crash)
  • FIXED: skipped mouse click after closing one of the tool windows
  • FIXED: Drag move of selection broken after last update
  • ADDED: Copy menu item (edit menu)
  • ADDED: Paste menu item (edit menu)
  • ADDED: Duplicate menu item (edit menu or Ctrl+D) <- copy+paste with offset (try it and see)
  • ADDED: Minimize/restore the program
  • ADDED: Increase/decrease properties with arrow keys or mouse scroll
  • ADDED: Keyboard shortcut (F5) to run/test the form
  • ADDED: First pass at function description template (insert comment for function title based on template file)
  • UPDATED: Changed the look of the properties inspector (still a work in progress)
  • UPDATED: Changed icon to be more in line with original GuiBuilder
  • UPDATED: Modified code generation to cleaner layout (in my opinion)
  • UPDATED: Modified test function to use _TempFile()
  • REMOVED: Vals menu item (edit menu) - superseded by new object explorer

 

Link to comment
Share on other sites

The tab control remains a problem. If anyone has any ideas of why it shows up as an empty rectangle on the form, I would love to hear them. Then generated GUI seems to work fine.

I wonder if it has to do with creating the control at a size of 1x1, and it doesn't want to be resized..
Nevermind, this was not the answer. 😔

Edit: I finally figured it out! Well, sort of... If the grid is turned on, the Tab control is invisible (or behind the grid). If the grid is off, it looks fine.
At least now I have something to look into.

Edited by kurtykurtyboy
Link to comment
Share on other sites

Hello,

 

How do I use the Menu Icon and the one next to it, clicking on them does nothing

Can you consider giving options to put in code behind an object , for example when a button is added would like to be able to add

code to it so when it is clicked the code behind the button runs

 

 

Thanks

Paul

 

Edited by HighlanderSword
Link to comment
Share on other sites

On 5/12/2022 at 6:30 PM, HighlanderSword said:

How do I use the Menu Icon and the one next to it, clicking on them does nothing

This is still a work in progress, so the menu icon and the one next to it (context menu) are disabled because they have not been implemented yet. Since it is not like other typical controls, it is going to need some additional dialogs to set the menus up. I would like to add that at some point but am focusing now on improving the stability and usability and some other minor features.

 

On 5/12/2022 at 6:30 PM, HighlanderSword said:

Can you consider giving options to put in code behind an object , for example when a button is added would like to be able to add

code to it so when it is clicked the code behind the button runs

This is one of those borderline GUI / code overlaps, so I am still on the fence about adding this and how far to take it. For now, the plan is to optionally create a function for each button, which the user can add code to themselves.

Link to comment
Share on other sites

Another update for v0.22 in the first post! More fixes and features.

A couple to mention:

  • You can now set font and background colors for labels, which I often use for visual layouts. Check the screenshot.
  • Huge progress on the Tab control! It no longer glitches out when drawing. You can add and delete individual tabs, set tab names, and set tab text properties. All associated code creation and definition file saving/loading works as well. I also switched the object explorer to a treeview to show the tabitem parent/child relationship.
    • To add new tabs, first draw the tab control. Then right-click on it to add as many new tabs as needed.
    • To delete tabs, first click to activate the tab you want to delete. Then right-click on the tab control in the drawing area to delete the current tab. (eventually this can be added to the object explorer, but my brain got burnt out from all the TABS swirling around in there)
    • To change the main tab control variable name, click on the tab control in the drawing area OR the top level item in the object explorer.
    • To change the individual tab item names or display text, you must click on the tab item in the object explorer to activate the tab. Just clicking in the drawing area will only select the main tab control.
    • All of this tab work has turned out to be a real BEAR (not quite a nightmare), but I am happy with where it's at for now. I think I am going to break from tabs for a while and work on other things. In the future, I'd like to be able to add controls inside tab items by drawing in the tab area. It shouldn't be too difficult, but just more things to keep track of. BE AWARE: there is a bug(?) where, when you delete the tab control, the property inspector tab control is also deleted! I suspect this has something to do with internal AutoIt functionality, but I am not too upset about it. I am probably going to change the properties to some other type of control anyway.
  • Now you can set the position and size properties of multiple controls at once. This is really handy for aligning things - just select the controls, set the Left (or any) property, then they are align to the left! I also enjoy putting the mouse over the properties and scrolling with the mousewheel and watching the controls shift across the screen. Maybe I am just simple minded like that! 😁
  • Now when you move controls with the arrow keys, they shift by 1px in the direction of the arrow for fine adjustments. Holding the Ctrl button while pressing the arrow keys will shift the controls by 10px - very handy to speed things up.
  • New statusbar to show informational messages.
     

Changes:

Spoiler
  • FIXED:    Tab control not showing when grid is on
  • FIXED:    Tab control and tab item creation now should work properly
  • FIXED:    Right-click menu deletes wrong item
  • FIXED:    Right-click context menu showing wrong/duplicate items
  • FIXED:    Fixed crash when changing properties of multiple controls at once (now works great for aligning controls!)
  • FIXED:    Text and name properties were limited to only the characters that could fit in the box
  • FIXED:    Spaces in Name property will now be replaced with underscores _
  • ADDED:    New tab and delete tab context menu items
  • ADDED:    Text color property for labels (works on multiple selection)
  • ADDED:    Background color property for labels (works on multiple selection)
  • ADDED:    New statusbar to show messages instead of popups and splash screens
  • UPDATED:    Better positioning of extra tool windows
  • UPDATED:    Arrow keys will now "nudge" the controls by 1 px, Ctrl+arrow key will move the controls by 10px
  • UPDATED:    Copy+Paste should not change the control text
  • UPDATED:    Changed object explorer from listview to treeview to show tab items
  • KNOWN ISSUE:    Deleting a Tab control also deletes the property inspector!

 

Edited by kurtykurtyboy
Link to comment
Share on other sites

Great stuff, keep up the good work. :) 

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

Looking good. I use a dark mode. If you could get the colors from the registry, I'll be able to see it better. Also a default size for the controls would be welcomed. ( I changed the 0xf7f9fe to 0x07090e to see the label in the PropertyInspector )
Thanks for working on it.

Edited by argumentum

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

New version is working great

Can you consider the following for future Updates:

Add in option for FileOpenDialog

Provide option to name the Gui, defaults to MyGUI

Provide an Option to load Koda design from the Au3 File

Save the windows locations (i..e Live Generated Code Dialog ,object explorer dialog)

 

Edited by HighlanderSword
Link to comment
Share on other sites

Could you post a screenshot? I only have windows 10 on my work laptop, so can't install a theme patcher for custom themes.

What are your values in these registry entries:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize\SystemUsesLightTheme
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize\AppsUseLightTheme
HKEY_CURRENT_USER\Control Panel\Colors\WindowText

I suppose temporarily, I could try setting the label colors to black instead of automatically letting AutoIt select the color. That way the GUI might not match the system, but at least it would be readable.

Link to comment
Share on other sites

..take a look at https://www.autoitscript.com/forum/topic/126716-control-viewer-autoit-window-info-tool/page/8/?tab=comments#comment-1440956  and read some of the thread. You'll find some code that may be helpful as I had to attend to the same coloring problem with a customer user :)

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

v0.23 dropped in the first post! There are not many front-end changes, but there is quite a lot going on in the background.

The highlights:

  • Converted the maps to objects using the AutoItObject UDF. I don't have any problem with maps in general, but I thought the use of objects would help clean up a lot of the code. And it did! I think a lot of my previous struggles will be much easier in the future. Plus, I learned a lot about how everything works as I made my way through the darker corners of the code.
  • Added the ability to apply a scaling factor to all size and position properties. I also updated the generated code to include a function originally by UEZ to grab the current DPI. This allows for the super simple creation of system aware GUIs that are properly scaled for the user's DPI setting
    ;standard control creation with no scaling
    GUICtrlCreateLabel("Label 1", 20, 20, 170, 20)
    ;scaling factor applied to scale for user DPI settings (normally, a tedious task)
    GUICtrlCreateLabel("Label 1", 20 * $iDpiFactor, 20 * $iDpiFactor, 170 * $iDpiFactor, 20 * $iDpiFactor)

     

  • Updated property inspector to pseudo scrolling list using the GUIScrollBars_Ex UDF by Melba23

  • Other miscellaneous bug fixes and improvements


I think next I will work on adding support for GUI properties like name, title, size, position, background, etc...
The future is looking bright for GuiBuilderPlus!

Link to comment
Share on other sites

Check out v0.24 in the first post! There are a number of improvements in this one.
Test it, use it, break it, and report it please.

Changes

  • ADDED:    Now you can set properties for the main GUI!
  • ADDED;    Added file menu item "Export to au3" for a more convenient and obvious way to save the generated code
  • ADDED;    Keyboard shortcuts to save to (Ctrl+S) or load from (Ctrl+O) definition file
  • ADDED;    Keyboard shortcut (Ctrl+A) and edit menu item to select all controls
  • ADDED;    Save window positions
  • ADDED;    Started implementation of main menu controls (no menu items yet)
  • ADDED;    Setting to generate code using OnEvent mode or Msg mode
  • ADDED;    Move control's creation order up or down the tree
  • ADDED;    Selecting a control will also highlight it in the object explorer (single select only, for now)
  • FIXED:    Wrong GUI width and height displayed in the titlebar at startup
  • FIXED:    Control names not applied when loading from agd definition file
  • FIXED:    Text looked slightly different in design vs runtime
  • FIXED:    Property Inspector window did not minimize/restore with the main GUI
  • FIXED:    Inconsistencies with displayed vs saved vs loaded GUI sizes
  • FIXED:    Controls not cleared when re-loading agd file
  • FIXED:    Sanitized some of the property inputs for invalid entry or removal (ex: -1 or "")
  • UPDATE:    More code generation improvements
Link to comment
Share on other sites

  • kurtykurtyboy changed the title to GuiBuilderPlus [updated March 24, 2024]

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