Jump to content

Sorting GUIs


Recommended Posts

  • Moderators

motionman95,

Try using this this in SciTE - you can have as many of them as you want: :blink:

#Region ; You can see what is inside when you click on the [+]

; But you cannot when you click on the [-]!!!!

#Endregion

Does it help? ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

motionman95,

Try using this this in SciTE - you can have as many of them as you want: :blink:

#Region ; You can see what is inside when you click on the [+]

; But you cannot when you click on the [-]!!!!

#Endregion

Does it help? ;)

M23

Awesome, that works perfectly! Only thing is isn't automatically hidden, but that's not much of a problem. Thanks!

Link to comment
Share on other sites

  • Moderators

motionman95,

Only thing is isn't automatically hidden

Easily fixed! ;)

In SciTE, open the menu <Options - Open User Options File>. Taking careful note of the

# END => DO NOT CHANGE ANYTHING BEFORE THIS LINE #-#-#-#-#-#

# START: DO NOT CHANGE ANYTHING AFTER THIS LINE #-#-#-#-#

lines, add this:

fold.on.open=1

and everything will be hidden on start (You may need to restart SciTE to see the effect :blink:.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

motionman95,

Easily fixed! ;)

In SciTE, open the menu <Options - Open User Options File>. Taking careful note of the

# END => DO NOT CHANGE ANYTHING BEFORE THIS LINE #-#-#-#-#-#

# START: DO NOT CHANGE ANYTHING AFTER THIS LINE #-#-#-#-#

lines, add this:

fold.on.open=1

and everything will be hidden on start (You may need to restart SciTE to see the effect :blink:.

M23

Awesome awesome awesome! Thanks * infinity!
Link to comment
Share on other sites

  • Moderators

motionman95,

When you reply please use the "Add Reply" button at the top and bottom of the page rather then the "Reply" button in the post itself. That way you do not get the contents of the previous post quoted in your reply and the whole thread becomes easier to read. :blink:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

motionman95,

Often means a syntax error (a missing EndIf or something) in your script. Try running Tidy on it (SciTE <Tools> menu or Ctrl-T).

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

@JamesBrooks:

Actually, it does do that. But it will only work when the document is left open when Scite is closed...

Err, on another topic, rather than create a new thread I decided to ask here. Like I said in the first post, I'm working with multiple GUIs. I was wondering if it was possible to store a control inside an array, in order to help keep the variables from interfering with each other in the multiple GUIs. Like this:

Global $cSettings
$settings = GUICreate("Redeem Now [by c0d3rk1d]", 371, 725, -1, -1)
$cSettings["group1"] = GUICtrlCreateGroup("Login Autofiller", 6, 109, 358, 93)
$cSettings["checkbox1"] = GUICtrlCreateCheckbox("Enable this", 15, 128, 97, 17)

Thanks in advance!

Link to comment
Share on other sites

  • Moderators

motionman95,

I was wondering if it was possible to store a control inside an array

You can of course store the ControlIDs in an array - but it is often difficult to remember which index refers to which control! :P To get around this, I use an Associative Array to store multiple ControlIDs. I can then use this array as a parameter within functions to prevent having to declare huge lists of Global variables or pass equally long lists of parameters when I call dependent functions:

A couple of snippets (amended from one of my scripts) to show what I mean: :blink:

; Create associative array to list ControlID parameters
Local $aParam_List
AssocArrayCreate($aParam_List, 10)

; Create controls which I want to access in several functions 
AssocArrayAssign($aParam_List, "Title5", GUICtrlCreateCheckbox(...))
AssocArrayAssign($aParam_List, "Title6", GUICtrlCreateCheckbox(...))
AssocArrayAssign($aParam_List, "Title7", GUICtrlCreateCheckbox(...))
AssocArrayAssign($aParam_List, "Title8", GUICtrlCreateCheckbox(...))
AssocArrayAssign($aParam_List, "Title9", GUICtrlCreateCheckbox(...))

; Create buttons which are only used in this function - so no need to put them in
Local $hApply_Button = GUICtrlCreateButton("Apply", 198, 130, 90, 30)
Local $hCancel_Global_Button = GUICtrlCreateButton("Cancel", 98, 130, 90, 30)

; Within GUIGetMsg loop
Case $hApply_Button ; Apply defaults
    On_Global_Apply($aParam_List) ; Pass all the ControlIDs in the one parameter

; And then within the On_Global_Apply function
Func On_Global_Apply($aParam_List)
    ; Check boxes
    If BitAND(GUICtrlRead(AssocArrayGet($aParam_List, "Title5")), $GUI_CHECKED) = $GUI_CHECKED Then
    ; ...
    If BitAND(GUICtrlRead(AssocArrayGet($aParam_List, "Title6")), $GUI_CHECKED) = $GUI_CHECKED Then
    ; ...
    If BitAND(GUICtrlRead(AssocArrayGet($aParam_List, "Title7")), $GUI_CHECKED) = $GUI_CHECKED Then
    ; ...
    If BitAND(GUICtrlRead(AssocArrayGet($aParam_List, "Title8")), $GUI_CHECKED) = $GUI_CHECKED Then
    ; ...
    If BitAND(GUICtrlRead(AssocArrayGet($aParam_List, "Title9")), $GUI_CHECKED) = $GUI_CHECKED Then
    ; ...

You can see that using an Associative Array you do not have to remember the index - you use the associated title (hence the name!). :

I use Nuster's UDF from here.

I hope this is useful. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...