dcsimg
Results 1 to 26 of 26

Thread: A custom compact and resizable Open File/Save File/Folder Select.

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    A custom compact and resizable Open File/Save File/Folder Select.

    This example using the latest glist4 and fileselector class for a compact file loader.
    From setup menu we can change the sort type, the behavior, the performance (normal recursive 3 levels, recursive all levels). For this example the scope is to open an image file so we have a preview. We can select "multiselect" and we can fill the list on the main form with files not only from one folder but from any folder that we can open "recursive". Each file has path on it.
    We can set a top folder so we can't go up beyond top folder.
    It is easy to use.
    Next time I make the Save File (need to take input...and I would like to finish gEditbox).

    2 bug fixes. One is a logic bug, because I use internal list and external list to populate the listbox without block the logic for menus. I fixed that making the flag in selector class as a property so in a change of it, secondary changes a flag in the glist so menu parcing is blocked. So simple. The other bug is also from menu. When you select a non selected radio button and click in an other line (wrong Y position) in right X position then that click goes to the radio button and enabled. So I put an condition check and bug is over.


    Programming is an art to describe your faults.

    *********** Good News ******
    The control is done. Now We can Save/Load/Select Folder only. Multiselection for files, tree of folders and or files, preview images (for the example). Also now glist can edit line and centered line too.
    Attached Images Attached Images   
    Attached Files Attached Files
    Last edited by georgekar; Sep 10th, 2014 at 06:27 AM. Reason: additional example and last version

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: Using FileSelector class to make a compact Open File dialog.

    Screen copy from linux with Wine. Tahoma font cannot find so no bold selected. Except that works fine.
    Attached Images Attached Images  

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: Using FileSelector class to make a compact Open File dialog.

    As you can see from above image, compact file selector never hide the full path. Header Height is variable. Also the break of path done in space (1st choise) or in a slash and if no one find, then split hard...the path.
    No using of system colors so in linux (the same exe) looks the same. I think that sans free font can change well the Tahoma font.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Resizable File and folder Selector

    New version. When we put "" for top path the selector give us the drive list. Also can open with UNC names any folder from network (but I haven't a list yet to display a starting point to browse). A big leap is that this form can get smooth resize by slide the surface. Now we have Open File and Folder Selector. (Next time I have to make a textbox for this control, so then we can write a new folder or a new file to save...)
    Attached Images Attached Images  
    Attached Files Attached Files

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: Using FileSelector class to make a compact Open File dialog

    New way to resize (by drag the lower right corner) but with an option in Set Up menu to "expand width". When we reduce the size, we always end in a standard ratio height/width. We can have in any height the same ratio if we want to reduce width (reducing stop when the ratio is the standard). So the routine for sizing is not a simple one.
    In addition to that a do some checks and I insert limits for the moving of the dialog, so never we loose the portion of header that needed for closing and moving purposes. (In the previous uploaded file is a risk if you take dialog to most left position and then take to most left and release the button...you loose the dialog..)
    Some minor additions, such as in all changes of sizes preview image has always the right aspect ratio. And i put a way to visualize the recursive reading by using the lower "textbox" for feedback, changing color.
    File Dialog has no textbox. Has only three glist controls, so they print on hdc in unicode. The top glist box lend the floating capability and we see only a header. The middle glist4 has two lists, one external and one internal and has two headers, one internal and one external. The internal part is the "Set Up" menu. The external header is a myDoc class with wrapping capabilities (by using event to an external "breakline" routine), that we use only one paragraph. The lower glist is the "textbox", I have a class named myTextbox and with that wrap a "Text" property to a glist. For feedback I am using the header (Headline) of that glist control. All the headlines are wrapping by a DrawText except the externals. But here for feedfback we see only the changing of names...so something happen...(reading of folders and the files and displayed as a tree on the middle glist). That textbox I want to work for input.

    As you see the file dialog can give as a tree list. We can't open or close sections of the tree, but we can choose any folder in the tree to open, any file and we can go up or down walking all the tree, and previewing images (for this example).


    Newer version, now we have a textbox. But not finished yet. I put it here because I fix a bug...so it is better now.
    Attached Files Attached Files
    Last edited by georgekar; Aug 25th, 2014 at 08:41 PM.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    At last the control is ready. I put it on the first post.

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Images from Window 7

    Checking the dialog in a Windows 7 computer.
    Works fine
    Attached Images Attached Images   

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Expanded Width and Tree View (at set up: recursive no limit)

    Here ia a screen shot from Folder Selector, using in setup (you can open it from two white bars thar are shaking when you operate the list) the recusrve style (is a radio button) and Expand Width (just a checked menu item). So we can display all the folders in C: and we can expand the width to see better the big names. As a last resort we have the shift button which deengage the pushing style and we can move left the mouse holding down button and shift to scroll the names left.
    Attached Images Attached Images  

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    The latest version of file selector
    I would like to make the color selector and the font selector same as this selector...so wait for some days...
    Attached Files Attached Files

  10. #10

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Color Selector and Font Selector

    At last I add Font and color selectors, so now the set is complete.

    Color Selector has a new design, it is a list with 16 million elements (it is a virtual list...) as hex values and we can click on headline and change the order of plane color (BGR -> GRB -> RBG) so with this and with scroll bar (or pushing up or down the list) we can change blue or green or red. Also we can write the hex value that we want and we will see the color in the "color" list. Dialog expand and move as the File Selector

    Font Selector has two lists, one with fontnames and one is a glist as menu and more. We can choose bold or italic, we can write the size and the charset, and we can choose standard charset and sizes.
    Attached Images Attached Images   
    Attached Files Attached Files

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    The last

    This is the last example. I remove the form1 with command buttons and place a nice selector as a main window. Also a make a fake taskbar title, and I can show selectors as modal window that can minimized with main window from fake window (it is fake because give as only the title in taskbar and the functionality to show or hide aka minimizes our selectors).
    Also I add a flag to slide the selected only item. Before that flag be true we have to prepare the flags for left or and right pan.

    glis4 class is a list, a menu, a button, a textbox, a window mover, in one control, using only the usercontrol as picturebox, tree shapes to perform as scrollbar, and five timers for auto scrolling ant other nice things. Also this control raise some cool events to use external list or whatever - look how the color selector list 16 million items, by using a virtual way.

    You can write the experience from that control..as a feedback
    Attached Images Attached Images  
    Attached Files Attached Files

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    This is the latest version. Now i handle mouseicon so we can resize (with magnification ) any selector,and can move...as well. There is the latest textviewer also

    in form1
    Code:
    Private Sub fsize_Click(Index As Integer)
    Select Case Index
    Case 0
    gList1.FontSize = 12
    Case 1
    gList1.FontSize = 22
    Case 2
    gList1.FontSize = 48
    End Select
    If Not myTextViewer Is Nothing Then
    myTextViewer.WrapAll
    If myTextViewer.HaveMarkedText Then myTextViewer.RelocateMarkedText
    myTextViewer.HorSrcoll 0
    myTextViewer.Render
    gList1.PrepareToShow 5   ' NEED THIS LINE TO MAKE THE WIDTH OF SCROLL BAR PERFECT
    End If
    End Sub
    Attached Files Attached Files
    Last edited by georgekar; Oct 31st, 2014 at 10:15 PM.

  13. #13
    Hyperactive Member
    Join Date
    Aug 2016
    Posts
    371

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    Quote Originally Posted by georgekar View Post
    This example using the latest glist4 and fileselector class for a compact file loader.
    From setup menu we can change the sort type, the behavior, the performance (normal recursive 3 levels, recursive all levels). For this example the scope is to open an image file so we have a preview. We can select "multiselect" and we can fill the list on the main form with files not only from one folder but from any folder that we can open "recursive". Each file has path on it.
    We can set a top folder so we can't go up beyond top folder.
    It is easy to use.
    Next time I make the Save File (need to take input...and I would like to finish gEditbox).

    2 bug fixes. One is a logic bug, because I use internal list and external list to populate the listbox without block the logic for menus. I fixed that making the flag in selector class as a property so in a change of it, secondary changes a flag in the glist so menu parcing is blocked. So simple. The other bug is also from menu. When you select a non selected radio button and click in an other line (wrong Y position) in right X position then that click goes to the radio button and enabled. So I put an condition check and bug is over.


    Programming is an art to describe your faults.

    *********** Good News ******
    The control is done. Now We can Save/Load/Select Folder only. Multiselection for files, tree of folders and or files, preview images (for the example). Also now glist can edit line and centered line too.
    good usercontrol but After the mouse click response is particularly slow

  14. #14

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    This is an old version of the user control. Latest version as I use it in M2000 Interpreter (and from this i made all other controls for GUI, EditBox, Combo, Button etc). Check the git for M2000 https://github.com/M2000Interpreter/Version8/
    or the code for control only. https://github.com/M2000Interpreter/...ster/glis4.ctl

    I found a way to work with mouse wheel, so when anyone make user forms in M2000 interpreter can use mouse wheel to any control, in any form, using only one hook (with SetWindowLong). (hooks are in Module 6 or Changeres.bas https://github.com/M2000Interpreter/.../changeres.bas

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    This is a video to show the new controls. The orange colored form is a form where Title, menu and editbox have the same type of user control I use classes over this control to add functionality. Editbox can color text, and you can see in this video, over 30000 lines of text of VB6 module with color.
    www.youtube.com/watch?v=HAw7Ny1XaYI

  16. #16
    Hyperactive Member
    Join Date
    Aug 2016
    Posts
    371

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    thanks . i will see
    but Your code commented too little .

  17. #17

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    Yes because I remember names of variables/subs. You have to choose from Options Editor a font with Greek letters like Courier New Greek (because some letters in some strings are in Greek language, my Interpreter work with commands in English and Greek language).
    There are two programs, the mexe.vbp and m2000.vbp, so for running these, you have to run the m2000.vbp to create a m2000.dll, for debugging in IDE and then run the mexe.vbp from ide (a second one) or compile it as m2000.exe and just run it.
    There is no external dll to install or need to use (ADO used for help system but is always in Windows).
    Use ctrl+F for search anything (this is my best tool in Vb6).
    (there is a typelib for reference, but I think the reference, inside vbp, works using relative address)
    Last edited by georgekar; Apr 16th, 2017 at 10:41 AM.

  18. #18
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,693

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    Quote Originally Posted by georgekar View Post
    This is an old version of the user control. Latest version as I use it in M2000 Interpreter (and from this i made all other controls for GUI, EditBox, Combo, Button etc). Check the git for M2000 https://github.com/M2000Interpreter/Version8/
    or the code for control only. https://github.com/M2000Interpreter/...ster/glis4.ctl

    I found a way to work with mouse wheel, so when anyone make user forms in M2000 interpreter can use mouse wheel to any control, in any form, using only one hook (with SetWindowLong). (hooks are in Module 6 or Changeres.bas https://github.com/M2000Interpreter/.../changeres.bas
    Hi georgekar, I have downloaded your code from github, but there are a lot of garbled code(unicode) in the source file. Could you put your source code in vbForums CodeBank? If so, it would be great.

  19. #19

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    You can find in dropbox too here https://www.dropbox.com/sh/xq8j8t7kb...PvfjPLb0a?dl=0
    Use Language for font in Ide GREEK (M2000 commands are in English and Greek Language)
    First change font language and then load the code. There is a tiny tlb referenced in the same directory. No special dll needed. You have to use two IDE, one for dll and the other for running it, or compile the small exe and use it when dll is running in one IDE.
    Before you open it make sure that you have 96 dpi for screen. Is essential because there is a problem with forms and fontsizes (a problem of VB6). In compiled code there is no worry about dpi.
    Get the 8.7 revision 25, is the latest.
    So 1) 96dpi screen and 2) Greek Language for Font in ide, 3) run dll in IDE and the tiny program (the Exe) in another, or run it as compiled one (as exe).
    Do that steps and we discuss anything about code later

  20. #20
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,693

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    Quote Originally Posted by georgekar View Post
    You can find in dropbox too here https://www.dropbox.com/sh/xq8j8t7kb...PvfjPLb0a?dl=0
    Use Language for font in Ide GREEK (M2000 commands are in English and Greek Language)
    First change font language and then load the code. There is a tiny tlb referenced in the same directory. No special dll needed. You have to use two IDE, one for dll and the other for running it, or compile the small exe and use it when dll is running in one IDE.
    Before you open it make sure that you have 96 dpi for screen. Is essential because there is a problem with forms and fontsizes (a problem of VB6). In compiled code there is no worry about dpi.
    Get the 8.7 revision 25, is the latest.
    So 1) 96dpi screen and 2) Greek Language for Font in ide, 3) run dll in IDE and the tiny program (the Exe) in another, or run it as compiled one (as exe).
    Do that steps and we discuss anything about code later
    Thank you, georgekar. DropBox, Youtube and Google are banned in our country, so I can't open the above link.

  21. #21

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    Wow..
    ok
    have you any idea, or an email (without compiled code i zipped it in 2.7 MBytes)

    i can't post here is too big to upload

  22. #22

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    From Google Drive ?
    https://drive.google.com/open?id=0Bw...mpva1pVdGlzMGM
    (without executables)

  23. #23
    Addicted Member
    Join Date
    Jun 2002
    Location
    Finland
    Posts
    159

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    https://dropfile.to/
    Maximum file size is 1GB. File expiration 24 hours

  24. #24

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    in a directory from console just type this:

    git clone https://github.com/M2000Interpreter/Version8.git

    for windows get git from here: https://git-scm.com/download/win

  25. #25

    Thread Starter
    Fanatic Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    948

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    This is the zip file from git (includes 2 executables, the dll of interpreter and a small starter for dll)
    https://dropfile.to/zBKPjdN

  26. #26
    Frenzied Member
    Join Date
    Sep 2012
    Posts
    1,693

    Re: A custom compact and resizable Open File/Save File/Folder Select.

    Quote Originally Posted by georgekar View Post
    This is the zip file from git (includes 2 executables, the dll of interpreter and a small starter for dll)
    https://dropfile.to/zBKPjdN
    I have downloaded the zip file, thank you very much, georgekar.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width