I am trying to create a ListIconGadget containing images and their names.
The text is always positioned to the right of the image but I would like it to be underneath instead.
Decreasing the width of of the gadget to that of the image just makes the text disappear off the right hand side and putting the text on a different line pushes the text off to the right as if an image were there.
Is there any way that I can position the text where I want it ?
ListIconGadget text layout
Re: ListIconGadget text layout
This is the default of OS Specific ListIconGadgets in Report View.
It is a bit complex, but you can also create your own control as you wish with the CanvasGadget.
It is a bit complex, but you can also create your own control as you wish with the CanvasGadget.
My Projects EventDesigner V3 / ThreadToGUI / OOP-BaseClass / Windows: Module ActiveScript
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
Re: ListIconGadget text layout
The ListIconGadget has 4 different display modes that can be changed from PB (see in Help)
For more changes to the styles you need some api function calls. Search for something like LVS_ALIGNLEFT.
If you are working with Windows, you can achieve full control by drawing the content yourself.
There are countless examples of owner draw possibilities in the forum.
For more changes to the styles you need some api function calls. Search for something like LVS_ALIGNLEFT.
If you are working with Windows, you can achieve full control by drawing the content yourself.
There are countless examples of owner draw possibilities in the forum.
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Re: ListIconGadget text layout
Thanks for the replies.
I am working cross-platform, but mainly on Linux.
I suspected that I would have to create my own and it looks like I was right.
I shall hunt around for a similar example so that I hopefully don't have to reinvent the wheel.
I am working cross-platform, but mainly on Linux.
I suspected that I would have to create my own and it looks like I was right.
I shall hunt around for a similar example so that I hopefully don't have to reinvent the wheel.
Re: ListIconGadget text layout
See the bottom-right image in the Help manual: https://www.purebasic.com/documentation ... adget.htmlKianV wrote: Thu Feb 05, 2026 6:25 pm I am trying to create a ListIconGadget containing images and their names.
The text is always positioned to the right of the image but I would like it to be underneath instead.
Re: ListIconGadget text layout
KianV wrote: I am working cross-platform, but mainly on Linux.
BarryG wrote: See the bottom-right image in the Help manual: https://www.purebasic.com/documentation ... adget.html
Help for ListIconGadget wrote: - SetGadgetAttribute() with the following attribute:
#PB_ListIcon_DisplayMode : Changes the display of the gadget (Windows only).
Collection of cross-platform examples with API functions to extend PureBasic


