Share your opinion
WIDGETS GAMBAS
GAMBAS 3 SOFTWARES
TUTORIALS
Library
|
FILEVIEW - Use Fileview
FILEVIEW
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 : 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 EventNow 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 Reactions to this article
| QUICK MENU
SEARCH
LANGUAGE
COMPONENTS
Other
LANGUAGE
Where, who?
VISITS
visitors visitors online ARCHIVES GAMBAS 1/2
|