[Implemented] Manipulate ExplorerListGadget Column

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

[Implemented] Manipulate ExplorerListGadget Column

Post by fsw »

Would be nice to be able to change the width of the name column by command like SetExplorerColumnWidth(GadgetID,ColumnID,Width).
GetExplorerColumnWidth(GadgetID,ColumnID,Width) would also be nice (so it can be stored and while the application starts read the value and set it.

Also to be able to delete a column would be nice (the TYPE column is mostly not needed).
Maybe just set the column width to 0 :?:

The ColumnWidth function could be useful for the other ListGadgets too...

(Implemented trough the gadget attribute: '#PB_Explorer_ColumnWidth')

I am to provide the public with beneficial shocks.
Alfred Hitshock
RJP Computing
Enthusiast
Enthusiast
Posts: 202
Joined: Sun Apr 27, 2003 4:44 am
Location: Michigan, USA
Contact:

Post by RJP Computing »

And on that note, to be able to add columns would be great. (ie. attributes of the files) Also it would be great to get the right click message when you right-clicked on the header.
Just some thoughts. Great gadget!

Thanks
-Ryan
RJP Computing

Ubuntu 8.10/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, nVidia GeForce 7600GT 512MB
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

On the list for the next update, i'll see what i can do...

Timo
quidquid Latine dictum sit altum videtur
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Post by fsw »

8)
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Post by Denis »

Hi fsw and RJP Computing,

To add a column, just use AddGadgetColumn() command. I try it with explorergeadget and it works well.


I'm wrinting a lib for listicongadget and i have tested the command to set width of column on ExplorerGadget. It works well.
ExplorerGadget is a listiconGadget.

Use this message to set column width :

sendmessage_(GadgetID(#ExplorerGadget),#LVM_SETCOLUMNWIDTH , ColumnIndex,Width)

Use this message to get column width :

sendmessage_(GadgetID(#ExplorerGadget),#LVM_GETCOLUMNWIDTH , ColumnIndex, 0)


Denis
A+
Denis
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Yes, ExplorerListGadget is a Listicon, and you can easily modify it
with the API commands.

However, I don't know, what happens, if you remove a column atm, as the
Gadget will continue to write data to it, so better set the with of the unused
columns to 0.

btw: ExplorerTreeGadget is a usual TreeGadget, I'm sure you can find
some hacks there as well :wink:

Timo
quidquid Latine dictum sit altum videtur
Denis
Enthusiast
Enthusiast
Posts: 778
Joined: Fri Apr 25, 2003 5:10 pm
Location: Doubs - France

Post by Denis »

You're 100% rigth Freak,

Better to add new commands for next version. :wink:


Denis
A+
Denis
Blade
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Aug 06, 2003 2:49 pm
Location: Venice - Italy, Japan when possible.
Contact:

Post by Blade »

Denis wrote: To add a column, just use AddGadgetColumn() command. I try it with explorergeadget and it works well.
...
ExplorerGadget is a listiconGadget.
...
Hello, I wonder how we then can fill that column. Perhaps with some callback (that I still can't understand at all)?
For example I'd like to show there the fist 100 byes of each file, if the file is a .txt
Is it possible? I could scan all the files after every refresh, but how can I know that when a refresh has finished?
Post Reply