Jump to content

[Resolved] GUI with vertical scrollbar to display and select pictures from folder


Faalamva
 Share

Recommended Posts

Sorry for that, I have cleaned up this thread a bit, so it's not cluttered anymore by my quotes ! :lol:

My script has evolved and now I have a button to move the selected images from the "Image" directory to another directory.

My new concern is : once the files are moved, how am I supposed to implement the refresh of the Child GUI ? The moved images shall obviously not appear anymore in the scrolling list. In memory, I can easily manage the update of the various arrays containing the image filenames, handlers, the selected states, etc... But how do I refresh the Child GUI from a graphical point of view ? I don't know if I have to somehow... delete the Child GUI content, re-execute the new image display part... :huh2:

Link to comment
Share on other sites

  • Moderators

Faalamva,

If the number of images is not too great then I would just delete all content from the GUI and reload the new image list. If you wanted to hide the process you could always place a suitable label over the child GUI while this is going on - or to be really snazzy, you could always take a screenshot of the current GUI and display that. ;)

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

Yes, but from an algorithm point of view, how do I go back from the infinite loop (i.e. the end of the Validate case where the move is done) back to the beginning of the program (where the images are loaded in memory) ?

Is there a "GUI-programming standard way" to do that ?

And what do you mean by "delete GUI content" ? What kind of instructions does it designate precisely ?

Sorry for those silly questions, that are probably obvious for you ! :idiot:

Cheers

Edited by Faalamva
Link to comment
Share on other sites

  • Moderators

Faalamva,

Load the images in a function - which you can call from wherever you are in the script. ;)

what do you mean by "delete GUI content" ?

Exactly what I say - delete all the controls in the child GUI. You have the ControlIDs in your pic and label arrays so you can easily loop through these arrays and use GUICtrlDelete on them - but do it before you adjust the arrays to remove the selected images. Then adjust the arrays to remove the moved images and call your "loading" function to reload the remaining images. :)

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

Simple as that ! Finally I have used a simple command : GUIDelete($ChildGUI) that deletes the ChildGUI and all the control it contains, without the need to delete them one by one. I have tested it and it seems to work properly.

The rest works perfectly well too, thank you. I have created a LoadImageFilenames() and a CreateChildGUI() functions that can easily be called from the Validate case.

I can't post the final result because I have created a lot of other controls in the parent GUI. Not only they don't relate to the main topic, but also the associated functions are very specific to my inner folders structure.

The last code version posted is pretty much it anyway.

Once again, many thanks for your help, reactivity and accuracy, all along the project. I thought I would have needed much more time than 1 week to learn and build my application from scratch. This is definitely the proof that AutoIt has a great potential and can do a crapload of things with very few line codes. :thumbsup:

Cheers,

Faalamva

Edited by Faalamva
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

×
×
  • Create New...