Jump to content

ChooseFileFolder - Interim Version 11 Mar 21


Melba23
 Share

Recommended Posts

  • Moderators

TheSaint,

Amended for the next release - thanks.

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

  • 4 weeks later...
  • Moderators

Nine,

Thanks for noticing that. It looks as if that particular variable is only required because _WinAPI_InProcess call requires a ByRef variable as a second parameter and so we need a declared variable before the call. In the old GUITreeView library there were many such calls, but now there is only the one found in _GUICtrlTreeView_Destroy, so a simple local variable would seem to be the solution. I will pass the info on to jpm.

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

The variable $__g_hTVLastWnd has totally disappeared from the GUITreeView UDF, unless I am mistaken (then it means I have a bug in my Search Content tool ;)).  But there is still a reference inside your UDF ChooseFileFolder.

Link to comment
Share on other sites

  • Moderators

Nine,

Got it now! There was a bug in the GUITreeView library when used in x64 which meant that I needed to add a couple of custom functions into the UDF. The changes to the Beta library mean that they are no longer needed and so will be removed in a future main release. I believe I posted about this somewhere - I will try and find the link - meanwhile I will add a suitable constant to my UDF to prevent the error.

M23

Edit: No, that was a bug in the GUIListView library where checkboxes are not read correctly.

Edited by Melba23

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

  • 2 weeks later...
  • Moderators

INTERIM VERSION 11 Mar 21

A bug in the x64 implementation of some the library TreeView functions meant that some replacement working functions were added to the UDF. Now the Beta TreeView library (from 15.3) has been modified, these functions are no longer required, but they will remain until the modified library is formally released. However, other changes in the Beta mean that the replacement functions will not work under it - don't you just love compatibility problems!

So here is an interim release with a modified replacement function so that it will function with Release and Beta versions under both x32 and x64 - I hope!

New UDF and examples in first post.

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

  • 2 years later...

Having an issue with this udf...I'll try my best to be clear.

This is my setup:

$cLV_1 = GUICtrlCreateListView("SKU", $ListView_GUI2_Spacing, $ListView_GUI2_Spacing, $ListView_GUI2_Width, $ListView_GUI2_Height, BitOR($LVS_SINGLESEL, $LVS_SHOWSELALWAYS, $LVS_EDITLABELS),$LVS_EX_CHECKBOXES)
        GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKBOTTOM+$GUI_DOCKLEFT)
    $ttDescriptionList = GUICtrlGetHandle(-1)
    $sHeaderList = _GUICtrlListView_GetHeader($cLV_1)

        _GUICtrlListView_SetExtendedListViewStyle($cLV_1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_HEADERDRAGDROP, $LVS_EX_GRIDLINES, $LVS_EX_CHECKBOXES));$LVS_EX_ONECLICKACTIVATE

        For $i = 1 To $Acols -1
            _GUICtrlListView_AddColumn($cLV_1, $sExcelRowTitle[$i], 100)
        Next

        ; Initiate ListView
        $iLVIndex_1 = _GUIListViewEx_Init($cLV_1, $aLVArray_1, 1, 0, True, $InitListOptions)

        _SetListViewColumnWidth($iLVIndex_1)

        _GUIListViewEx_InsertSpec($iLVIndex_1, 0, $aLVArray_1)

        Global $aLVCol_1[$Arows][$Acols]
        $iRet = _GUIListViewEx_LoadColour($iLVIndex_1, $aLVCol_1)

        _GUIListViewEx_LoadHdrData($iLVIndex_1, $aHdrData)

        $aRet = _GUIListViewEx_ReturnArray($iLVIndex_1)

    ;$cTV_FileOnly = GUICtrlCreateTreeView($ListView_GUI2_Spacing, $ListView_GUI2_Spacing, $ListView_GUI2_Width, $ListView_GUI2_Height)
    $cTV_FileOnly = _GUICtrlTreeView_Create($hGUI, $ListView_GUI2_Spacing, $ListView_GUI2_Spacing, $ListView_GUI2_Width, $ListView_GUI2_Height)
    GUICtrlSetResizing($cTV_FileOnly, $GUI_DOCKTOP+$GUI_DOCKBOTTOM+$GUI_DOCKLEFT)
    GUICtrlSetState($cTV_FileOnly, $GUI_HIDE)

 

$ExcelFile = _CFF_Embed($cTV_FileOnly, "|" & $sRootFolder, "*.*", 0 + 12 + 16, $cStop_FileOnly)

 

When I use GUICtrlCreateTreeView everything works fine unless I try to setup a default folder...which is what I really want to do. If I set up a default folder, I am unable to select anything. When I click the plus sign beside the folder the gui screen does a quick flash and the plus sign disappears.

When I use _GUICtrlTreeView_Create, when the app starts, the listview does not show properly. Everything is hidden in the listview and I have to move the mouse over the listview for things to appear, and the dropdown boxes in the listview do not drop down, I have to press the down arrow to see the selections.....but I'm able to select things in the treeview when setting a default folder.

 Is there a solution?

Link to comment
Share on other sites

  • Moderators

Champak,

That sounds as if you have not registered the UDF message handlers. Do you have this line at the top of your script:

; Register UDF message handler
_CFF_RegMsg()

M23

Edited by Melba23
Speeling

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

Yes _CFF_RegMsg(is implemented.

There seems to be two things that's causing the problems with _GUICtrlTreeView_Create (I'm unable to determine what's causing the problem with GUICtrlCreateTreeView).

1/ The size of the treeview. It can't be the same size as the listview, otherwise I am unable to select anything on the listview (even though I hid and disabled the treeview, and gave the listview top position.)

2/ The treeview has to be called before the listview, otherwise I can't see the listview. This doesn't make sense since I hide the treeview. The problem with this is although I'm able to access the listview this way, the treeview shows through the listview. And everytime I access an input of the listview, the treeview shows through that cell after I hit enter.

I also tried foregoing creating the tree control in the start of the app and just create it when the function is called and delete it at the end of the function, but when I do that nothing is able to be selected if I call the function a second time.

So do I have to use _GUICtrlTreeView_Create to use the default folder or is that just what you chose to use in your examples? Is it possible to use GUICtrlCreateTreeView?

Also, if there is no return Control specified because I want to double click to select a file, how do I use a button to close/cancel the treeview?

The only other way that I can see to remedy this is to not use the embed version, which would lead me to simply go back to the plain old dialog version, which wouldn't be ideal for me.

 

Edited by Champak
Link to comment
Share on other sites

  • Moderators

Champak,

It was not clear to me from your first post that the ListView and TreeView occupied the same space on the GUI. I tend to move the controls around when doing this, rather than hiding/showing them - I find it reduces the problem of getting them to redisplay correctly. Here is an example script showing what I think you are trying to do:

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>
#include <WindowsConstants.au3>

#include "GUIListViewEx.au3"
#include "ChooseFileFolder.au3"

; Dummy variables
Global $aLVArray_1[][] = [["0-0", "0-1", "0-2"], _
                        ["1-0", "1-1", "1-2"], _
                        ["2-0", "2-1", "2-2"]]

Global $Acols = 3

$hGUI = GUICreate("Test", 500, 500)

; ListView

$cLV_1 = GUICtrlCreateListView("SKU", 10, 10, 480, 350, BitOR($LVS_SINGLESEL, $LVS_SHOWSELALWAYS, $LVS_EDITLABELS))
_GUICtrlListView_SetExtendedListViewStyle($cLV_1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_HEADERDRAGDROP, $LVS_EX_GRIDLINES, $LVS_EX_CHECKBOXES))
_GUICtrlListView_SetColumnWidth($cLV_1, 0, 100)
For $i = 1 To 2
    _GUICtrlListView_AddColumn($cLV_1, "Col-" & $i, 100)
Next

; Initiate ListView
$iLVIndex_1 = _GUIListViewEx_Init($cLV_1, $aLVArray_1, 1, 0, True);, $InitListOptions)

;Insert data
_GUIListViewEx_InsertSpec($iLVIndex_1, 0, $aLVArray_1, False, True)

; TreeView

$cTV_FileOnly = GUICtrlCreateTreeView(510, 10, 480, 350) ; Create off screen

; Button

$cButton = GUICtrlCreateButton("Choose", 10, 400, 80, 30)

GUISetState()

; Register messages for GUIListViewEx - but NOT for WM_NOTIFY
_GUIListViewEx_MsgRegister(False)
; Register messages for CFF - but NOT for WM_NOTIFY
_CFF_RegMsg(False)
; Register our own handler for WM_NOTIFY so BOTH UDFs can use it
GUIRegisterMsg($WM_NOTIFY, "_Combined_WM_NOTIFY_Handler")

While 1

    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $cButton
            Switch GUICtrlRead($cButton)
                Case "Choose"
                    ; Swap control positions
                    GUICtrlSetPos($cLV_1, 510, 10, 480, 350)
                    GUICtrlSetPos($cTV_FileOnly, 10, 10, 480, 350)
                    ; Need to do this to prevent recursive selections
                    GUICtrlSetData($cButton, "Select")
                    ; Run CFF
                    _CFF_Embed($cTV_FileOnly, "|m", "*.*", 0 + 12 + 16, $cButton)
                    ; Swap the control positions back
                    GUICtrlSetPos($cTV_FileOnly, 510, 10, 480, 350)
                    GUICtrlSetPos($cLV_1, 10, 10, 480, 350)
                    ; Reset button text to rearm
                    GUICtrlSetData($cButton, "Choose")
            EndSwitch
    EndSwitch

WEnd

Func _Combined_WM_NOTIFY_Handler($hWnd, $iMsg, $wParam, $lParam)
    ; Run CFF handler
    _CFF_WM_NOTIFY_Handler($hWnd, $iMsg, $wParam, $lParam)
    ; Run GUIListViewEx handler - this must be last if colour is involved
    _GUIListViewEx_WM_NOTIFY_Handler($hWnd, $iMsg, $wParam, $lParam)

EndFunc

That works for me - both the ListView and TreeView are actionable and visible at the correct times. How does it work for you|?

M23

Edit:

Just reread your post above and seen:

Quote

Also, if there is no return Control specified because I want to double click to select a file, how do I use a button to close/cancel the treeview?

Try reading the _CFF_Embed function header. Hint - look at the $cReturn 0 line:

;                  $cReturn     - Set single/multiple selection
;                                 0 -  Single selection (default).  Doubleclick returns item - @extended set to 0
;                                 1  - Multiple selection.  Doubleclick adds item to return string
;                                 Valid ControlID - Control to action to end multiple selection - @extended set to 0

Obviously once a single file is selected, the TV automatically closes.

At times I do wonder why I bother to write these comprehensive headers.............

Edited by Melba23
Needed to add more explanation

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

Your example isn't working for me either with the path. I don't know if it's supposed to work like this or if it's a bug, but once a path is put in, I can no longer go to ANY other folders. I press the plus sign to other folders and the plus sign disappears. The only time this problem doesn't occur is if it is the drive alone that is set as the path. This is the same thing that is happening to my script, the primary problem. 

Ex: use _CFF_Embed($cTV_FileOnly, "|C:\Windows\", "*.*", 0 + 12 + 16, $cButton) and you can't open any folders in or out of that "Windows" dir. If you don't put the trailing "\" you can't open the "Windows" folder.

As for the  _CFF_Embed function, I saw the header and instructions before, and it wasn't, and still isn't clear to me on how to execute what I want. I have it set with a 0, but that doesn't explain how to close the window if I don't select an item. It says double click returns item, it doesn't say anything about closing the window if I don't want to select an item. The only way I found to close the window was to put a control in there, but when I do that I also have to use the button to return the item, I can't just double click the item. What did I miss with that?

Link to comment
Share on other sites

  • Moderators

Champak,

I am afraid that the script works perfectly for me when I use that default folder (both with and without a trailing backslash). I can open and expand all the folders within the C: drive without problem. What version of AutoIt, the UDF and Windows (with 32/64 ness) do you use?

Quote

but that doesn't explain how to close the window if I don't select an item

From the same function header, but a little lower:

; Return values .: Success: Single selection = String containing selected item
;                           Multi selection  = String of selected items delimited by "|"
;                  Failure: Returns "" and sets @error as follows:
;                           <...>
;                           7 = Esc pressed to exit

Just press Escape and you exit the embedded TreeView and return to the ListView.

M23.

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

Autoit 3.3.16.0

Windows 10 Pro 64Bit

The download on the first post is installed

 

9 hours ago, Melba23 said:

Just press Escape and you exit the embedded TreeView and return to the ListView.

OK, it just came back to me, I tried using escape in the past, but it seemed to conflict with the listviewEX colors, and since I was implementing the button to return at that time I just disregarded the esc to exit because I didnt want to bother you with other issues with the listview since we were dealing with more pressing issues with the listview that didn't have an alternative. I ended up forgetting about the esc and didn't read beyond the parameters this time because everything seemed to be working.

This is the error I get when pressing esc when I have the embed dialog open.

(659) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
$aData_Colour_Ordered[$i][$j] = $aData_Colour[$i][$aColOrder[$j + 1]]
$aData_Colour_Ordered[$i][$j] = $aData_Colour[$i][^ ERROR

Link to comment
Share on other sites

I tried your script on two other computers, unfortunately the same os build (once upon a time I was smart enough to have computers with different OS around smh)...and same result with the treeview. One of the computers has all the windows updates.

Edited by Champak
Link to comment
Share on other sites

  • Moderators

Champak,

Your system and code appear to be the same as mine - so I am not at all sure why we are getting such different results.

So I can investigate the "Esc" error (which of course I do not get!):

1. What is the value of $InitListOptions you are using when initialising the ListView. This way I can see which sections of the GUIListViewEx UDF might be affected when pressing that key.

2. Do you still get that error when using the "move controls" code I posted above or only when using your code from the first of your posts on this matter?

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

Hi to all, is there a way to autoexpand the selected folder on script opening? (as in the image below)

I am using this code as template. Thanks.

#include <MsgBoxConstants.au3>
#include <ChooseFileFolder.au3>
#include <array.au3>

Local $sRet, $aRet

; Register handlers
$sRet = _CFF_RegMsg()
If Not $sRet Then
    MsgBox(16, "Failure!", "Handler not registered")
    Exit
EndIf

; Pre-check the AutoIt executable file
Local $aPreCheck_List[] = ["C:\new\other", "C:\new\other\1.txt", "C:\new\other\2.txt", "C:\new\other\3.txt", "C:\new\other\4.txt"]
; Note that pre-checked file will be returned unless expanded and cleared
_CFF_SetPreCheck($aPreCheck_List)
; Only lowest item on a checked tree will be returned
$sRet = _CFF_Choose("Ex 10 - Preset checkbox", 300, -1, -1, -1, "C:\new", default, 0 + 16 + 512, -1)
If $sRet Then
    $aRet = StringSplit($sRet, "|")
    $sRet = ""
    For $i = 1 To $aRet[0]
        $sRet &= $aRet[$i] & @CRLF
    Next
    MsgBox($MB_SYSTEMMODAL + $MB_ICONINFORMATION, "Ex 10 - Multiple with pre-checked", "Selected:" & @CRLF & @CRLF & $sRet)
Else
    MsgBox($MB_SYSTEMMODAL + $MB_ICONINFORMATION, "Ex 10", "No Selection")
EndIf

Immagine2023-06-17175948.png.e64a8a14148360ce53961b15c5714e1e.png

Edited by gabritb01
Link to comment
Share on other sites

  • Moderators

gabritb01,

Quote

is there a way to autoexpand the selected folder on script opening?

Yes - as explained in the function header - look for <<<<<<<<<<<<<<:

;      To permit drive selection:
;      "" (default) = All ready drives shown
;      List of drive letters (e.g. "cde") = Limit display to these drives if ready
;      Add "|drive letter" (e.g. "cde|d" or "|d") = Highlight and expand specified drive tree on opening
;          or "|folder path" (e.g. "cde|d:\folder) = Highlight specified folder (add "\" to expand folder) <<<<<<<<<<<<<<<<<<
;      Add "|c" (e.g. cde||c" or "|d|c" or "||c)  = Display drives in separate combo not treeview

So add a backslash to your folder path like this

$sRet = _CFF_Choose("Ex 10 - Preset checkbox", 300, -1, -1, -1, "C:\new\", default, 0 + 16 + 512, -1)

That works for me when I run it on one of my folders - try it on yours.

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