A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.
I’m using a DirListBox and a FileListBox on a form. They’re positioned next to each other. But for some or other reason I can’t get their heights the same. I’ve even gone as far as setting the FileListBox’s height to that of the DirListBox, but where I break the code right after that, and you look at the values, they still differ.
It makes my form look crappy because they don’t line up.
I'm guessing you're doing this because you want a user to be able to select which files to merge (a previous thread) ?
You'd do better to use the LoadFile dialog that is built into windows and accessible from VB.
Yes, it’s still that merging app (takes much longer that I’d like to admit!) :(
A common dialog won’t suffice. The user must be able to select specific extensions, plus the user must be able to select files with a certain string in the name.
Suppose I can add InputBoxes for those…
Please let me know if you have other ideas.
Create a new standard VB project. Add the MS Dialog Control (component) to your project and create a new VB form.
Add the following to the form load event.
.InitDir = "c:\temp"
.FileName = ""
.Filter = "All Files|*.*|Justin Files|*.jjj|Justin US Files|*us*.jjj"
.Flags = cdlOFNAllowMultiselect Or cdlOFNExplorer
When run this will open in the directory c:\temp (make sure there is one). put 3 files in this directory jtest.jjj justin.jjj and justin.txt.
The filter property is a pipe separated list, each pair corresponding to the Files of Type description and filter properties. The example here shows all, all jjj files and any jjj file with "us" in the name.
The user must be able to type the file extensions (delimited by a “;”), and/or type a string to search for in the filename.
To use your example, I’d have to have one Inputbox for the user to enter the extension (the “jjj” in your example), and a second Inputbox for a string in the file name (“us” according to your example).
Would’ve been so much easier if the common dialog had editable fields.
Unfortunately I’ve had to finish the little app. Couldn’t spend any more time on it. Doesn’t look too bad – it’s color coded to match other products, and I’ve moved a statusbar over the bottom part of the DirListBox and the FileListBox so you can’t see that they don’t line up.
Classic case of Kamikaze-coding.
(Well, the app was just for one client for one user, so I’ll just have to live with myself for not doing anything smarter.)
Thanks allot for your help.
I’ll definitely post again if I’ve got another teaser.
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz