TvDialog

derez

Expert
Licensed User
Longtime User
I have been using Fg dialog for quite a while and noticed that I don't use the file's details (size,date) and that I have to scroll a lot in the table because it displays only 6.5 files.

I made the attached library for the same use - file and directory browser for the sake of openning or saving a file, or selecting a directory.
The display is by treeview only, with the directories first and then the files, this way you can see a longer list of files after the directory is selected.

It is possible to toggle between sorting by name or by date.

The zip includes the dlls and cs files (yes, this can be merged) and a demo program which also show how to use it.
The last used directory is stored for the next time.

Thanks to Agraham - I learned from his color dialog library how to do it.

Note: I noticed that when using the demo program, second request takes a long time for the dialog to appear. This behaviour is not evidenced in larger size programs, where I get the dialog to appear after 2-4 seconds. I guess its a matter of garbage collection processes.

Edit: - updated to ver 1.1
- updated to ver 1.2 - the icon images are embeded in the code.
- Ver 1.3 enables to define location on screen of the dialog form - Desktop only.
 

Attachments

  • tvd2.jpg
    tvd2.jpg
    33.5 KB · Views: 118
  • Export 1.3.zip
    20.5 KB · Views: 86
Last edited:

derez

Expert
Licensed User
Longtime User
Updated to ver 1.1 -
The facility to select several types for filtering is added to the .net by B4PPC.
After learning this I added this functionality also :

tvd.ShowOpen("*.jpg;*.bmp;*.gif")
 

derez

Expert
Licensed User
Longtime User
The icon images are now embeded into the code, using sitajony's FileEncoder . Thanks :)

btw - does anyone know how to switch sharpdevelop to wrap the text in the main window ?
 
Last edited:

Mr_Gee

Active Member
Licensed User
Longtime User
I was looking for such a lib, great stuff !:sign0060:

One question though, would it be possible to add coords to the popup?
at the moment the dialog pops up at a set location on screen..
would be great if it could be relative to the form..

thanks again
 

derez

Expert
Licensed User
Longtime User
[at the moment the dialog pops up at a set location on screen..
would be great if it could be relative to the form..
/QUOTE]

I'm not sure I understand. On the device the dialog is a form and fills the whole screen.
On the desktop it appears somewhere, but why use this library for the desktop ? the existing windows dialog is fine...

If you do want it for Desktop - I shall look into it.
 

Mr_Gee

Active Member
Licensed User
Longtime User
On the desktop it appears somewhere, but why use this library for the desktop ? the existing windows dialog is fine...

I'm using it as a folder chooser on the desktop, looks and works great!

If you do want it for Desktop - I shall look into it.

Great thanks!
 

derez

Expert
Licensed User
Longtime User
Sorry, I tried but it does seem to have any effect.

I tried forms Location, Left and Top, tried to set the startposition but to no avail.

I noticed that the dialog forms appear each time at a lower and to the right from the previous, until starting over close to the left top point of the screen.

We need an advice from Agraham or Erel.
 

Mr_Gee

Active Member
Licensed User
Longtime User
I noticed that the dialog forms appear each time at a lower and to the right from the previous, until starting over close to the left top point of the screen.
Yes I noticed the same thing..
Lets see if agraham or Erel have any idea, thanks for trying though :)
 

derez

Expert
Licensed User
Longtime User
Agraham,

the compiler does not accept

Form.StartPosition = FormStartPosition.Manual;

I write in the initialize sub: this.StartPosition = FormStartPosition.Manual; but still get a complaint that FormStartPosition does not exist in the current context.

Can you try it on colordialog ? (I cpied the concept of the form creation from you, so it should be the same for this issue).
Thanks.
 

derez

Expert
Licensed User
Longtime User
The problem is that in Compact Framework these methods do not exist.
After changing to .net Framework it is solved.

I'll update the library soon.:)
 

derez

Expert
Licensed User
Longtime User
Ver 1.3 for Desktop is now updated at the first post.

It enables definition of the position on screen of the dialog form, by NEW2 method.
 

Paulsche

Well-Known Member
Licensed User
Longtime User
Hello Derez, there are somewhere examples or guidance on the functions of TVDialog?
 
Top