EDIT:
-Please see second post below March 28
https://autohotkey.com/boards/viewtopic ... 03#p139603
deleted original post which only explained what i was looking for. I posted a working GUI as a demonstration (in second post in this thread) of where I would like to try to add the Scrolling GUI inside of a tab, along with cited other links from forums where this seems to be sort of working.
Scrolling gui within a Tab
- AlleyArtwork
- Posts: 44
- Joined: 09 Jun 2015, 21:08
Scrolling gui within a Tab
Last edited by AlleyArtwork on 28 Mar 2017, 20:31, edited 3 times in total.
Re: Scrolling gui within main gui window
search for "just me" (the user) ScrollGUI script, I believe it would do exactly what you want just out of the box in the example
- AlleyArtwork
- Posts: 44
- Joined: 09 Jun 2015, 21:08
Re: Scrolling gui within main gui window
my Apologies in advance for my own necro'd post.
I took a break from this and revisited it several times over.. well, a while I'd say, while trying to get it to work but I was unable to either apply tabs to the example GUI or apply the Scrolling function to my current tabbed GUI.
Here's a simplified version of the GUI i've got now, with the explanation of what I want on the tab I need it in:
I've tried to apply tabs to the working examples in the Class_ScrollGUI topic mentioned earlier, but I can't seem to get tabs to work in it, and I'm just not sure how to insert those scrollable controls into my existing GUI to work on one of the tabs.
I also found this post by evilC which has an image that seems like exactly what I'm trying to accomplish (I don't want my GUI to be resizable, but I do want the scroll bars to appear inside the tabbed window). I can't tell if this was something that was introduced for use, or an abandoned idea.
Anyway, thank you for looking, and forgive the sloppy GUI
I took a break from this and revisited it several times over.. well, a while I'd say, while trying to get it to work but I was unable to either apply tabs to the example GUI or apply the Scrolling function to my current tabbed GUI.
Here's a simplified version of the GUI i've got now, with the explanation of what I want on the tab I need it in:
Code: Select all
autotypepath = %A_WorkingDir%
#SingleInstance force
SetWinDelay 0
;|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
;;;;;; Gui Settings ---- Gui Settings ---- Gui Settings ---- Gui Settings ---- Gui Settings ----
;|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Gosub, TrayMenu
Gosub, FileMenu_app
;~ gosub, hotkey_list
;~ gosub, hotkey_guide
WinSet, Transparent, 0, %apptitle%
Gui, Add, Tab2,x0 y0 w460 h270 cblack gtabcontrol vtabcontrol altsubmit, Custom Hotkeys|Standard Hotkeys
gui, add, statusbar, ,%apptitle%
gui, +Owner ; Makes GUI owned and will not create a Taskbar button
Gui, show, w460 h290, %apptitle% ;
;; Begin Tab 1 GUI ---- Tab 1 GUI ---- Tab 1 GUI ---- Tab 1 GUI ---- Tab 1 GUI ---- Tab 1 GUI ----
Gui, tab, 1
Gui, Add, GroupBox, x10 y25 w440 h240 center cgreen, Custom Hotkey Data
Gui, Add, Text, xp+20 yp+20 wp-30 cblue, Enter text into the text boxes to assign that data to the specified hotkey.
Gui, Add, Text, xp+0 yp+25 wp-20 , WindowsKey + 1 =
Gui, Add, Text, xp+0 yp+25 wp-20 , WindowsKey + 2 =
Gui, Add, Text, xp+0 yp+25 wp-20 , WindowsKey + 3 =
Gui, Add, Text, xp+0 yp+25 wp-20 , WindowsKey + 4 =
Gui, Add, Text, xp+0 yp+25 wp-20 , WindowsKey + 5 =
gui, add, edit, xp+100 yp-105 wp-10 h20 vchk1, I would like to add more edit boxes/hotkeys%chk1%
gui, add, edit, xp+0 yp+25 wp-0 hp+0 vchk2, to this column without making the GUI taller%chk2%
gui, add, edit, xp+0 yp+25 wp-0 hp+0 vchk3, and be able to scroll within this tab%chk3%
gui, add, edit, xp+0 yp+25 wp-0 hp+0 vchk4, and only on this tab%chk4%
gui, add, edit, xp+0 yp+25 r4 wp-0 vchk5, I don't care if it can be mouse VS click & drag scrolled, just as long as I don't have to make the GUI larger to accomodate the extra edit boxes%chk5%
Gui, Add, Button, xp-100 yp+70 gsubmithkdata vsubmithkdata Default, Set Hotkey Data
Gui, Add, Button, x+4 gclearhkdata, Clear All Hotkeys
Gui, Add, Button, x+150 guserguide, Instructions
;; Begin Tab 2 GUI ---- Tab 2 GUI ---- Tab 2 GUI ---- Tab 2 GUI ---- Tab 2 GUI ---- Tab 2 GUI ----
;;;;;;;;;; Generates the list of hotkeys and their descriptions/examples on tab 2
Gui, tab, 2
Gui, Add, GroupBox, x10 y25 w440 h210 center cgreen, Hotkey Activators and What They Do
Gui, Add, edit, xp+5 yp+15 hp-20 wp-10 ReadOnly, %hotkeylist% ; Edit appearance of this list below in the sub "hotkey_list"
Gui, Add, Button, gviewinnotepad, View hotkey list in notepad
;------------------------------------------------------------------------
return
submithkdata:
gui, submit, nohide
FileDelete, %schksettings%\chk.txt
FileDelete, %schksettings%\chkm.txt
FileAppend, %chk1%`n, %schksettings%\chk.txt
FileAppend, %chk2%`n, %schksettings%\chk.txt
FileAppend, %chk3%`n, %schksettings%\chk.txt
FileAppend, %chk4%`n, %schksettings%\chk.txt
FileAppend, %chk5%, %schksettings%\chkm.txt
SB_SetText(" Saving new custom data | ")
sleep, 100
SB_SetText(" Saving new custom data || ")
sleep, 100
SB_SetText(" Saving new custom data ||| ")
sleep, 100
SB_SetText(" Saving new custom data |||| ")
sleep, 100
SB_SetText(" Saving new custom data ||||| ")
sleep, 100
SB_SetText(" Saving new custom data |||||| ")
sleep, 100
SB_SetText(" Saving new custom data ||||||| - ok! ")
sleep, 400
SB_SetText(" Your custom hotkey data has been set! ")
return
clearhkdata:
GuiControl,, chk1,
GuiControl,, chk2,
GuiControl,, chk3,
GuiControl,, chk4,
GuiControl,, chk5,
gui, submit, nohide
FileDelete, %schksettings%\chk.txt
FileDelete, %schksettings%\chkm.txt
SB_SetText(" Your custom hotkey data has been cleared! ")
return
pdrivelink:
run %user_pdrive%
return
tabcontrol:
Gui, Submit, nohide
SB_SetText(apptitle)
if tabcontrol = 1
SB_SetText( name_f ", Create your own personalized hotkeys. Enter text, save, then use your hotkey!")
if tabcontrol = 2
SB_SetText(" Tip: You can use any hotkey anywhere that you can type text! ")
return
TrayMenu:
Menu, Tray, tip, %apptitle%
Menu, Tray, MainWindow
Menu, Tray, NoStandard
menu, tray, icon
Menu, Tray, DeleteAll
Menu, Tray, Add, Show, Show
Menu, Tray, Add, Hide, Hide
;Menu, Tray, Add, Exit, GuiClose
Return
FileMenu_app:
;; Begin Menu ---- Menu ---- Menu ---- Menu ---- Menu ---- Menu ---- Menu ---- Menu ----
;Menu, HelpMenu, Add, &Directions, HelpShowHide
Menu, HelpMenu, Add, &How do I use this`?, userguide
Menu, HelpMenu, Add, &About, helpabout
;~ Menu, ToolMenu, Add, Turn &ON AutoType, autotypeon
;~ Menu, ToolMenu, Add, Turn O&FF AutoType, autotypeoff
Menu, FileMenu, Add, H&ide Window, Hide
Menu, FileMenu, Add, R&eload - Refresh Info, Reload
Menu, FileMenu, Add,,
Menu, FileMenu, Add,,
Menu, FileMenu, Add, E&xit, HelpShowHide
Menu, MyMenuBar, Add, &File, :FileMenu
;~ Menu, MyMenuBar, Add, &Tools, :ToolMenu
Menu, MyMenuBar, Add, &Help, :HelpMenu
Gui, Menu, MyMenuBar
Return
Show:
WinSet, Transparent, 255, %apptitle%
Gui, Show, , %apptitle%
Return
Hide:
WinSet, Transparent, 0, %apptitle%
return
Reload:
reload
return
viewinnotepad:
FileDelete, %schksettings%\hotkeylist.txt
FileAppend, %hotkeylist%, %schksettings%\hotkeylist.txt
IfWinExist, hotkeylist.txt
WinActivate, hotkeylist.txt
else,
run, %schksettings%\hotkeylist.txt
return
userguide:
FileDelete, %schksettings%\userguide.txt
FileAppend, %hotkey_guide%, %schksettings%\userguide.txt
IfWinExist, userguide.txt
WinActivate, userguide.txt
else,
run, %schksettings%\userguide.txt
return
HelpAbout:
Gui, 2:font, cblack s8
Gui, 2:+owner1 ; Make the main window (Gui #1) the owner of the "about box" (Gui #2).
Gui +Disabled ; Disable main window.
Gui, 2:Add, Text, w250, %helpabouttext%
Gui, 2:Font, norm
Gui, 2:Add, Button, , OK
Gui, 2:Show, , About %apptitle%
return
HelpShowHide:
Gui, 2:font, cblack s8
Gui, 2:+owner1 ; Make the main window (Gui #1) the owner of the "about box" (Gui #2).
Gui +Disabled ; Disable main window.
Gui, 2:Add, text, w250 , You can Show or Hide the Hotkey window by right clicking on the icon in the system tray or in the File -> Hide option in the File Menu.`n`nTo close this application press ALT + F4.`n(You will not have access to the Hotkeys if you close this application.)
Gui, 2:Font, norm
Gui, 2:Add, Button, , OK
Gui, 2:Show, , Help with %apptitle%
return
2Buttonok:
2GuiClose:
2GuiEscape:
Gui, 1:-Disabled ; Re-enable the main window (must be done prior to the next step).
Gui Destroy ; Destroy the about box.
return
FileExit:
process, close, schkat.exe
GuiClose:
process, close, schkat.exe
version =
apptitle =
credits =
name_display =
name_full =
name_f =
name_l =
init_f =
init_l =
init =
addescription =
user_email =
user_pdrive =
password_last =
password_expires =
password_change =
ExitApp
I also found this post by evilC which has an image that seems like exactly what I'm trying to accomplish (I don't want my GUI to be resizable, but I do want the scroll bars to appear inside the tabbed window). I can't tell if this was something that was introduced for use, or an abandoned idea.
Anyway, thank you for looking, and forgive the sloppy GUI
- AlleyArtwork
- Posts: 44
- Joined: 09 Jun 2015, 21:08
Re: Scrolling gui within a Tab
Any confirmation if this just isn't possible, or is currently experimental?