Page loading

Share your opinion
What do you think about gambaslinux.fr?
 
Interesting
It miss some informations
Excellent website
Results
WIDGETS GAMBAS
GAMBAS 3 SOFTWARES
TUTORIALS
Library
FILEVIEW - Use Fileview

FILEVIEW


fileview01.jpg

Bonjour,
Hi, today i propose to you to test FILEVIEW component, who allow you to create a fast file manager, because, it already manage:

Mime type files
View in icon or list : ShowDetailed property
view hiddent files or not : ShowHidden property
Small picture view : Showpreview property
Select mode single or multiple files : Mode property

To inser  fileview, clic on this icon bellow in your tab widget :

fileview00.jpg

1- Change for your own icon


.
Une astuce est celle de pouvoir changer une icone dans la vue.
Very simple to change one icon by your favourite icon.
Use ICON EVENT of this widget.

on icon event you have this code :
Public Sub fileView1_Icon(Path As String)
End

Just compare file path with icon you want to change and it's all.
For our example i want to change /home/USER path icon, i write :

Public Sub fileView1_Icon(Path As String)
If path = System.User.Home Then fileView1.Icon = picture["computer.xpm"]
EndIf
End

 In this example i change my  /Home/USER icon

It's so simple.

2-Double click Event


Now if i click on fileview, i have 3 cases :

i double click on folder
I double click on executable file
I double click on document (phot, video, text,etc..)

To chek if it's executable :
If Right(Stat(ficon.Current).Perm[System.User.Home], 1) = "x" Then 'test if executable


To check if it's folder :
 If IsDir(ficon.Current) Then 'test if folder
 
 To check mimetype file of document :
  mymime = DesktopMime.FromFile(ficon.Current).Type)
 
 Now fileview doesn't have other secret for you.
 Thanks for your attention.
 

Creation date : 05/02/2022 @ 23:39
Last update : 05/02/2022 @ 23:43
Category : FILEVIEW
Page read 1687 times


Print the article Print the article


react.gifReactions to this article

Nobody gave a comment yet.
Be the first one to do it!


QUICK MENU
SEARCH




LANGUAGE
COMPONENTS
Other
LANGUAGE
Where, who?
VISITS

   visitors

   visitors online

ARCHIVES GAMBAS 1/2
^ Top ^