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
Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
I'll make sure something like that is on the todo list. In addition to (or perhaps instead of) an automatic resizing mode, perhaps there can be a new automatic label such as this:

GuiSize:
; This subroutine is launched automatically whenever window size changes.
GuiControl, Move, MyEdit, %A_GuiControlEvent%
return

For the above, I'm thinking A_GuiControlEvent could contain the new size every time the user changes the window size. However, that would not be very flexible so maybe it's better just to do:

GuiSize:
GuiGet, GuiPos, pos ; Retrieves rect or coord/dimensions for client area.
GuiControl, move, MyEdit, W%GuiPosW% H%GuiPosH%
return

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

GuiSize:
; This subroutine is launched automatically whenever window size changes.

though not what i initially expected, but this i guess will be more powerful and flexible.

MIA

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


Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
btw there can b issues like when exactly does the section launches:
-when user grabs the edge
-when edge is moved
-when edge is finally released

MIA

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


Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
right now the edit ctrl doesn't accept a grp option... but if its possible then add one that launches the related section whenever the edit fields value 'changes' (not when the field is clicked etc.)... it has several uses, one of them is easy incremental search for scripts, another is for data forms where the totals etc. update automatically if a value is updated (like excel) without needing an 'update' etc. button to be pressed.

MIA

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


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
I'll assume you're talking about g-labels. It's a good idea and I'll make sure it's on the list.

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
Can GUI text links be done?

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
You can simulate a text link with something like this working example:

Gui, Font, underline
Gui, Add, Text, cBlue gMyLink, This is clickable like a hyperlink.
Gui, Font, norm
Gui, Show
return

MyLink:
Run, www.google.com
return

Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
just wondering... why can't i add .ani files (animated cursors) in ahk guis? ..they're the next best thing to animated gifs which i guess can't be supported.

MIA

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


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
It relies on the OS for support of the various file types. So whatever XP can do is what a script can do. Have you already tried animated gifs? They just stay stuck on the first frame?

Jax
  • Guests
  • Last active:
  • Joined: --
See this code snipit... ANI icons do not work from resource... but will from file..

int Style=WS_CHILD|WS_VISIBLE|SS_ICON|WS_TABSTOP|WS_GROUP|SS_NOTIFY;

HWND A = CreateWindowEx(Exstyle,"static",NULL,Style,X,Y,0,0,hWnd,(HMENU)id,g_hInstance,NULL);

HICON hBitmap=LoadImage(0,szIco,IMAGE_ICON,0,0,LR_LOADFROMFILE|LR_CREATEDIBSECTION);

int	Animate=100;
SendMessage(A,(UINT)STM_SETIMAGE,(WPARAM)IMAGE_ICON,(LPARAM)hBitmap);
SendMessage(A,Animate,(WPARAM)STM_SETIMAGE,(LPARAM)IMAGE_ICON);


Rajat
  • Members
  • 1904 posts
  • Last active: Jul 17 2015 07:45 AM
  • Joined: 28 Mar 2004
yes .gif stucks on first frame.... but for eg. if i show a .ani file as an icon in au3 gui then its shown as animated, while in ahk gui it doesn't show at all.

MIA

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