ExplorerListGadget Large Icons

Windows specific forum
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

ExplorerListGadget Large Icons

Post by IdeasVacuum »

PB5.62 x86, Win7 x64

So, first time I have used the ExplorerListGadget for image files only!

I expected to see Image Thumbnails, as you do in Windows, with these settings:

Code: Select all

ExplorerListGadget(#MyExp,  0,  0, 170, 375, sgImgsVerbatim, #PB_Explorer_NoFolders | #PB_Explorer_NoParentFolder | #PB_Explorer_NoDirectoryChange | #PB_Explorer_NoDriveRequester | #PB_Explorer_NoMyDocuments | #PB_Explorer_AutoSort)
SetGadgetAttribute(#MyExp, #PB_Explorer_DisplayMode, #PB_Explorer_LargeIcon)
[/size]

.........but all I get is small file type icons:

Image

What am I doing wrong?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Bisonte
Addict
Addict
Posts: 1226
Joined: Tue Oct 09, 2007 2:15 am

Re: ExplorerListGadget Large Icons

Post by Bisonte »

Maybe your windows settings ?

I don't know exactly where it is, but there was an explorer setting (show always icons or similiar...)

Ah i think here it is (sorry german windows ;) )
Image
PureBasic 6.04 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: ExplorerListGadget Large Icons

Post by IdeasVacuum »

Hi Bisonte

Double-checked, unfortunately not the cause of the issue.

I think PB is a bit out of date with Windows Explorer, where the icon size choices are Extra Large, Large, Medium and Small. Only "small" uses the file type icon rather than a thumbnail.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: ExplorerListGadget Large Icons

Post by Dude »

Has the ExplorerListGadget() ever used actual image thumbnails? :shock: I've wanted that for years, but just thought it wasn't possible. Is it meant to be possible? Maybe an API way?
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: ExplorerListGadget Large Icons

Post by IdeasVacuum »

Has the ExplorerListGadget() ever used actual image thumbnails?
I would hope so, otherwise what would be the point of specifying size?

Gosh - in searching the forum, I found this:
http://forums.purebasic.com/english/vie ... =5&t=60679
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
normeus
Enthusiast
Enthusiast
Posts: 414
Joined: Fri Apr 20, 2012 8:09 pm
Contact:

Re: ExplorerListGadget Large Icons

Post by normeus »

Create your own icons using GDI to resize. Have a look at this netmeastro's sample code:

http://www.purebasic.fr/english/viewtop ... 85#p170185

don't tell IdeasVacuum from 2014 or you'll disrupt the time continum.


Norm.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: ExplorerListGadget Large Icons

Post by IdeasVacuum »

.....also, if it is the case that the Help is wrong and the ExplorerListGadget is not "like Explorer", there would still seem to be a bug because "Large Icons" are not large at all - in fact they are small!

This is also true with images in a ListIconGadget, #PB_ListIcon_LargeIcon - shows thumbnails, but only tiny ones, crudely scaling down good images into poor images. :shock:
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: ExplorerListGadget Large Icons

Post by IdeasVacuum »

Hi normeus!

Well, I am doing my own thumbnails as a work-around but it's not great because there needs to be a lot of unnecessary code to support subsequent file manipulation/display of many thumbnails (looking at Canvas in a ScrollArea) whereas if the ExplorerListGadget worked like Windows Explorer (as claimed in the PB Help), virtually no code is required because large thumbnails can be displayed by default and files drag-dropped too. Unfortunately useless as-is in my case because the User needs to identify image files by seeing the images.

Given that Windows Explorer has delivered this functionality since 2009, it would seem the PB Explorer could do with a bit of a make-over :D
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Fig
Enthusiast
Enthusiast
Posts: 351
Joined: Thu Apr 30, 2009 5:23 pm
Location: Côtes d'Azur, France

Re: ExplorerListGadget Large Icons

Post by Fig »

2019, I am looking for large icon for picture files...
I feel really fooled. :?
There are 2 methods to program bugless.
But only the third works fine.

Win10, Pb x64 5.71 LTS
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: ExplorerListGadget Large Icons

Post by BarryG »

FWIW, I get large icons from using the #PB_Explorer_LargeIcon flag. Must be a setting on your PC disabling them?

If you've got Win 10 Pro, try your code in the Windows Sandbox to see how it looks on a clean default system.

Code: Select all

If OpenWindow(0, 0, 0, 400, 200, "ExplorerListGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ExplorerListGadget(0, 10, 10, 380, 180, "C:\Windows\", #PB_Explorer_NoFolders | #PB_Explorer_NoParentFolder | #PB_Explorer_NoDirectoryChange | #PB_Explorer_NoDriveRequester | #PB_Explorer_NoMyDocuments | #PB_Explorer_AutoSort)
  SetGadgetAttribute(0, #PB_Explorer_DisplayMode, #PB_Explorer_LargeIcon)
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Image
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: ExplorerListGadget Large Icons

Post by IdeasVacuum »

Hi BarryG

I don't think so - Windows 7 - Windows 10 offer the User various sizes on-the-fly.

I don't know how it is on MAC OS or Linux, but that might be the reason - compatibility with the others.

Edit: By the way, is your screen capture showing "large" icons? The largest "Extra Large" icons on Win 7 are roughly 270 x 276 pixels. The "Large" icons are 105 x 115.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Shardik
Addict
Addict
Posts: 1989
Joined: Thu Apr 21, 2005 2:38 pm
Location: Germany

Re: ExplorerListGadget Large Icons

Post by Shardik »

IdeasVacuum wrote:I don't know how it is on MAC OS or Linux, but that might be the reason - compatibility with the others.
No, this can't be a problem of compatibility because the flags for #PB_Explorer_DisplayMode are only working on Windows!
PB-Documentation for [url=https://www.purebasic.com/documentation/gadget/explorerlistgadget.html][color=#0040FF][u]ExplorerListGadget()[/u][/color][/url] wrote:- GetGadgetAttribute() / SetGadgetAttribute(): With the following attribute:

#PB_Explorer_DisplayMode : Changes the display of the gadget. Can be one of the following constants (Windows only):
#PB_Explorer_LargeIcon: Large icon mode
#PB_Explorer_SmallIcon: Small icon mode
#PB_Explorer_List : List icon mode
#PB_Explorer_Report : Report mode (columns, default mode)
I would interpret "Large icon mode" as using 32x32 icons and "Small icon mode" as using 16x16 icons.
Post Reply