small listview enhancement

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Bitblazer
Enthusiast
Enthusiast
Posts: 733
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

small listview enhancement

Post by Bitblazer »

the ability to disable or hide checkboxes on specific entries in a listview gadget.Suggested solution:

SetGadgetItemState(#Gadget, Item, State)

currently State can only be 0 or 1 so the checkbox can be selected or unselected but neither hidden, half-selected or disabled.
New usage suggestion:

SetGadgetItemState(#Gadget, Item, State)
State:
#PB_Checkbox_Checked
#PB_Checkbox_Unchecked
#PB_Checkbox_Inbetween
#PB_Checkbox_Disabled
#PB_Checkbox_Hidden

Dunno if both are disabled and hidden are needed, at least disabled would be useful. Would make my app look less confusing to end users as i list time entries per day and being able to select time entries in the past, makes no sense without a time machine for my app ;)
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: small listview enhancement

Post by IdeasVacuum »

That would be a great enhancement. It is probably very difficult for Fred to implement it though - for example, it's not necessarily supported by all of the underlying OS APIs.

Here though is a simple example on Windows OS (C++):
https://stackoverflow.com/questions/119 ... ific-items

I think much depends on how much your list can grow dynamically, because it should be possibly to DIY exactly what you need using a Canvas Gadget.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Bitblazer
Enthusiast
Enthusiast
Posts: 733
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: small listview enhancement

Post by Bitblazer »

IdeasVacuum wrote:That would be a great enhancement. It is probably very difficult for Fred to implement it though - for example, it's not necessarily supported by all of the underlying OS APIs.

Here though is a simple example on Windows OS (C++):
https://stackoverflow.com/questions/119 ... ific-items

I think much depends on how much your list can grow dynamically, because it should be possibly to DIY exactly what you need using a Canvas Gadget.
Thanks i will look into it. Windows is enough for this project.The list is rather small - between 1 to 60 items. A canvas gadget sounded nice some weeks ago, till i had some "unfixable" problems and "everybody" was telling me to use a listview ;)
webpage - discord chat links -> purebasic GPT4All
said
Enthusiast
Enthusiast
Posts: 342
Joined: Thu Apr 14, 2011 6:07 pm

Re: small listview enhancement

Post by said »

Hi,

Until the required enhancements are added ... have you considered a ListIcon gadget, it can show checkboxes along with texts

Said
Post Reply