Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

GUI ideas


  • Please log in to reply
191 replies to this topic
Nemroth
  • Members
  • 278 posts
  • Last active: Dec 31 2011 10:53 PM
  • Joined: 07 Sep 2004
I must say that I didn't try and that I don't know if this feature already exist or not (I know , it's bad...) but I want to know if there is, in the GUI management, the opposite of "gui, submit, nohide" (and if there isn't, I'd like to see it, of course).

In fact, "gui, submit, nohide" allow the AHK programmer to get the content of the variables of the GUI without cancel or destroy it.

So is there an internal command wich permits to change, without destroying and showing again the GUI, to change the content of a DropDownList, a ComboBox or a ListBox ?

We can consider for example that the content of the DropDownList, ComboBox or ListBox is in a variable, and that it is, for example, "1||2|3". After the selection of a specific radio button, checkbox or button, I want the content of my variable to become "one||two|three". Is there a possibility to change the content of the DropDownList, ComboBox or ListBox "dynamically" (without hiding then showing the GUI) ?

Of course, I know that I can achieve this effect with the "Control" command, but perhaps is it possible to have a simpler way to do it.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Yes, there will be a simpler way to do it. The planned command would work like this:

GuiControl, Text, MyListBox, One||Two|Three

Where "MyListBox" is the control's associated variable (used to uniquely identify it in this case).

Nemroth
  • Members
  • 278 posts
  • Last active: Dec 31 2011 10:53 PM
  • Joined: 07 Sep 2004
Thanks Chris,

It's really good news.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004

GuiControl and GuiControlGet

after seeing this in the change log, i thought style/exstyle are finally here! lol

by the way I couldn't use GuiControl to blank an edit box...

Gui, Add, Edit, x26 y7 w130 h20 vMyEdit, Edit, test
Gui, Add, Button, x46 y37 w80 h20, Ok
Gui, Show, x325 y183 h67 w183, Generated using SmartGUI 2.7
Return

GuiClose:
ExitApp

ButtonOk:
        GuiControl,, MyEdit
Return

By default, threads launched as a result of GUI action will now operate upon the window number where the action occurred

This has made things a lot confusing!
i'm not considering the few places where i'd to fix my code because of this... but now i've made '1:' additions to all gui 1 commands. now not declaring 'whichGui' in a complex code has become problematic ...and not recommended except for the rare circumstance where 2 or more guis use the same section.
but maybe except for the specific declaration part for first gui too... this'll add some more functionality.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

by the way I couldn't use GuiControl to blank an edit box...

Thanks, I've fixed that.

The "default window number" change was made because it seems that more often than not, GUI threads operate upon their own windows. Obviously, integrated apps like SmartGUI are an exception.

I was planning to add a "Gui, DefaultWindow, N" command that would allow a thread to change its default window. I guess it could additionally be made so that if it is used in the auto-execute section, it would become the default window for all GUI threads.

beardboy
  • Members
  • 443 posts
  • Last active: May 27 2017 08:41 AM
  • Joined: 02 Mar 2004
Could there be a way to have a command that would cause the GUI to flash on the start bar? I think this might have been asked before, sorry if it has.

thanks,
beardboy

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Since it was easy to add a primitive version, I did so. In the future there will probably be more options to make it easier to use, though those options might not function on 95/NT because they do not support the more advanced flashing API function.

Thanks for the suggestion.

beardboy
  • Members
  • 443 posts
  • Last active: May 27 2017 08:41 AM
  • Joined: 02 Mar 2004
Is it already possible to have ListBoxes that allow you to select multiple options by holding down the ctrl key? If not could that be added?

thanks,
beardboy

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Yes, this should be in the next release (hopefully Tuesday). Thanks.

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
i couldn't get most styles to work on pic controls... just a couple of them worked fine.

and by the way controlgettext doesn't work on listbox... can something be done?

also can there be a way to set control style (eg. flat button) in the GUI's properties itself instead of each of its controls?

and finally, please link styles page in the index.

thanx.

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

i couldn't get most styles to work on pic controls... just a couple of them worked fine.

I think that's normal. Some of them don't work due to the automatic scaling feature that resizes the picture according to the specified dimensions (if any). If there's a particular style you think should work that doesn't, please let me know.

and by the way controlgettext doesn't work on listbox... can something be done?

Thanks, I'll see if it can be extended.

also can there be a way to set control style (eg. flat button) in the GUI's properties itself instead of each of its controls?

Like for example setting a default style for all buttons? Sounds like a good enhancement.

and finally, please link styles page in the index.

ok

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
some more stuff to bother u ;)

-maybe i did something wrong but now multi-line edit didn't word-wrap itself and reqd 'multi' with .21
-the button last clicked on gui has two spl borders...one black outside and another dotted inside... if possible then plz remove the dotted one... it also causes the text to wrap on small buttons
-the default button (the one that responds to enter) doesn't do so once some other button is mouse-clicked... it should always respond to enter, no matter which control is active (except for edit controls). for active buttons we always have 'space' key.
-also can't 'see' the default button getting pressed on pressing enter.
-pic styles that didn't work...0x04, 12, 08, 10, 11, 06
-End / Del hotkeys don't work on win9x (give msg)
-how about an option added to default loop that does reverse counting?

MIA

CleanNews.in : Bite sized latest news headlines from India with zero bloat


polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
Dam correct me if I'm wrong but is the GUI the biggest change AHK has seen? It's cool.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


beardboy
  • Members
  • 443 posts
  • Last active: May 27 2017 08:41 AM
  • Joined: 02 Mar 2004
Is this a different type of ListBox? Or is this some other type of control? Could this be implimented?
Posted Image
thanks,
beardboy

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004

some more stuff to bother u ;)

The more the better. I don't get much in the way of feedback and good ideas, so I value what I can get.

-maybe i did something wrong but now multi-line edit didn't word-wrap itself and reqd 'multi' with .21

I think that was fixed in the update before today's. If you re-download and discover it's still a problem, please let me know.

-the button last clicked on gui has two spl borders...one black outside and another dotted inside... if possible then plz remove the dotted one... it also causes the text to wrap on small buttons

That's a built-in feature of the OS: When a button has keyboard focus, it gets a "focus rectangle".

-the default button (the one that responds to enter) doesn't do so once some other button is mouse-clicked... it should always respond to enter, no matter which control is active (except for edit controls). for active buttons we always have 'space' key.

That is also built-in. When a button has focus, pressing enter will always trigger that button. If you want to avoid that, use "GuiControl, Focus, MyControlVar" to switch focus after every press.

-also can't 'see' the default button getting pressed on pressing enter.

I think that's normal. However, I'll look into adding some code that shows the button being pressed. This might slow down operations a little when the window is being closed (which is normal for a button press).

-pic styles that didn't work...0x04, 12, 08, 10, 11, 06

From the way they're defined, it seems that bitmap'd static controls don't support them. This is because they occupy the same bits as SS_BITMAP, so it would be impossible to have those styles in effect while SS_BITMAP is also in effect. However, those styles should work for text controls.

-End / Del hotkeys don't work on win9x (give msg)

Do you mean they silently fail to become hotkeys?

-how about an option added to default loop that does reverse counting?

You mean that A_Index could count backwards from the starting number, which would be 15 in the below example?
Loop, *15

Is this a different type of ListBox? Or is this some other type of control? Could this be implimented?

I'm not sure what that is. Perhaps it is a SysListControl32 or an owner-drawn ListBox (i.e. custom code). I'll make a note to research it when most of the other control types are done.