Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
121 user(s) are online (117 user(s) are browsing Forums)

Members: 0
Guests: 121

more...

Support us!

Headlines

 
  Register To Post  

listbrowser columns
Home away from home
Home away from home


See User information
Regarding colums and listbrowsers. Do you have to show all the columns? Or can i have more info(more columns) in the node than i want to be shown in the listbrowser?
I'd like to have 2 extra columns that contains info that i do not want to be visible.

X5000
Go to top
Re: listbrowser columns
Supreme Council
Supreme Council


See User information
Yes, that works, and is something I make use of occasionally.

Probably the better way though, is to allocate a structure, fill the data and add it to the LBNA_UserData field.

But hidden columns works as well.

Simon

Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such.
----
http://codebench.co.uk
Go to top
Re: listbrowser columns
Amigans Defender
Amigans Defender


See User information
@Rigo

Speaking of hiding: have you noticed that when you hide a node (or any odd number of nodes) in a listbrowser list with LISTBROWSER_Striping, TRUE, the striping effect will be borked? It appears that the stripes are applied to all nodes in the list, not just the visible ones as it should be. This is with the latest public listbrowser.gadget, 53.52.

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: listbrowser columns
Supreme Council
Supreme Council


See User information
No, I haven't, but then I don't use that feature anywhere.

Perhaps you have a small example showing this?

Simon

Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such.
----
http://codebench.co.uk
Go to top
Re: listbrowser columns
Amigans Defender
Amigans Defender


See User information
@Rigo

Just check the striping feature section of the listbrowser code; if you don't see the LBFLG_HIDDEN flag being checked for, then you know that the feature is wrongly implemented.

EDIT: Also see mail.


Edited by trixie on 2013/8/4 13:26:23
The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: listbrowser columns
Supreme Council
Supreme Council


See User information
Fixed, thanks.

Simon

Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such.
----
http://codebench.co.uk
Go to top
Re: listbrowser columns
Site Builder
Site Builder


See User information
@Rigo
Quote:
Probably the better way though, is to allocate a structure, fill the data and add it to the LBNA_UserData field.


Is there any example on how we could use it, adding data to it, and sort the same column based on these data?

Follow me on
Ko-fi, Twitter, YouTube, Twitch
Go to top
Re: listbrowser columns
Amigans Defender
Amigans Defender


See User information
@walkero

Quote:
Is there any example on how we could use it, adding data to it, and sort the same column based on these data?

You define a data structure, allocate memory for it, fill in your data, then add the pointer to the structure to the LBNA_UserData field via SetListBrowserNodeAttrs(). When freeing your listbrowser list you must retrieve all existing pointers from all LBNA_UserData fields and free the allocated memory.

But I don't think you can sort columns based on that because the user data field relates to the entire node, not individual columns.

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: listbrowser columns
Site Builder
Site Builder


See User information
@trixie
I see... Thanks for your remarks. So, if you want to sort the list based on info you don't want to be visible, then the only easy way to do it is to have a hidden column in listbrowser.

Follow me on
Ko-fi, Twitter, YouTube, Twitch
Go to top
Re: listbrowser columns
Home away from home
Home away from home


See User information
@walkero

If you don't want the info you are sorting on to be visible then ofcourse you can use the UserData field.

Check the info in the LBM_SORT method.
You need to create a hook function and it will be passed a message structure in that structure, suprise suprise are pointers to the userdata pointers of the two nodes being compared in any one invocation of the hook.


Go to top
Re: listbrowser columns
Just can't stay away
Just can't stay away


See User information
How do you hide a whole column at once ? Not hiding every node separately.

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project