Modify ListViewGadget - can it be done
Modify ListViewGadget - can it be done
Hi,
Is there any way to have a ListViewGadget only show the Items and no scrollbar or border etc. or do I have to write my own?
I want this so I just see a list of items floating on screen that looks clean and simple, will be using my Surface Pro to flick
the list up/down or select item.
Cheers!
Is there any way to have a ListViewGadget only show the Items and no scrollbar or border etc. or do I have to write my own?
I want this so I just see a list of items floating on screen that looks clean and simple, will be using my Surface Pro to flick
the list up/down or select item.
Cheers!
Re: Modify ListViewGadget - can it be done
Ok I have sussed the no border bit after searching the forum so now just need to get rid of the scrollbar
SetWindowLongPtr_(GadgetID(2), #GWL_EXSTYLE, GetWindowLongPtr_(GadgetID(2), #GWL_EXSTYLE)&~#WS_EX_CLIENTEDGE) ; NO BORDER !!!!
Is there a similar piece of code to get rid of the scrollbar or a modification to the above line ?
SetWindowLongPtr_(GadgetID(2), #GWL_EXSTYLE, GetWindowLongPtr_(GadgetID(2), #GWL_EXSTYLE)&~#WS_EX_CLIENTEDGE) ; NO BORDER !!!!
Is there a similar piece of code to get rid of the scrollbar or a modification to the above line ?
Re: Modify ListViewGadget - can it be done
Hi RamRat,
I made a little Demo of a TouchListControl a few years ago.
The code is a mess, because it was just to proof if and how easy it could be done.
Also I made a cleaned up version as include later on, but shame on me - I cannot find it anymore.
But maybe it's if some worth for you.
Hint: In Line 141 you should change '0.98' into '0.997' to get a better (Phone-like) scrolling experience.
Greetz, PL.
I made a little Demo of a TouchListControl a few years ago.
The code is a mess, because it was just to proof if and how easy it could be done.
Also I made a cleaned up version as include later on, but shame on me - I cannot find it anymore.
But maybe it's if some worth for you.
Hint: In Line 141 you should change '0.98' into '0.997' to get a better (Phone-like) scrolling experience.
Greetz, PL.
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
Re: Modify ListViewGadget - can it be done
Hi
Edit :Modified
Code: Select all
LoadFont(0,"Tahoma",12)
If OpenWindow(0, 0, 0, 400, 200, "ListViewGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
SetWindowColor(0,$D3FFFF)
ContainerGadget(0,10,10,380,175,#PB_Container_BorderLess)
ListViewGadget(1, -1, -1, 402, 182)
CloseGadgetList()
SetGadgetFont(1,FontID(0))
SetGadgetColor(1,#PB_Gadget_BackColor,$D3FFFF)
For x = 1 To 30
AddGadgetItem (1, -1, "Item " + Str(x) + " of the Listview")
Next
SetActiveGadget(1)
SetGadgetState(1,0)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Last edited by RASHAD on Wed Dec 28, 2016 10:47 pm, edited 1 time in total.
Egypt my love
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Modify ListViewGadget - can it be done
You might find it easier to achieve with a ListIcon
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Modify ListViewGadget - can it be done
Awesome! Thanks mate. works just how I wantRASHAD wrote:HiEdit :ModifiedCode: Select all
ContainerGadget(0,10,10,380,175,#PB_Container_BorderLess) ListViewGadget(1, -1, -1, 402, 182) CloseGadgetList()
Now...
1. It works fine on touchscreen BUT can it be forced to scroll smoother ?
2. When an item is selected can the selected items font change colour and not the background? (I tried "SetGadgetState(2,-1)" kinda works but doesn't remove all traces of item selection....)
3. Anyone have an idea how to hack a fadein/fadeout onto the top and bottom of the ListViewGadget
Cheers!
Last edited by RamRat on Thu Dec 29, 2016 3:22 am, edited 1 time in total.
Re: Modify ListViewGadget - can it be done
What is different with ListIcon that makes it easier? oh... will ListIcon provide a smoother scroll?IdeasVacuum wrote:You might find it easier to achieve with a ListIcon
Cheers!
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Modify ListViewGadget - can it be done
No, it's simply that ListIcon is more often used, and thus whatever you want to do has probably been done before and the code posted on the forum. Take a look at RS Basic's Win API Lib, lots of Windows API for the ListIcon are documented there.
http://www.rsbasic.de/winapi-library/ You can download it too. ListIcon could be viewed as a 'plus' version of a ListView.
http://www.rsbasic.de/winapi-library/ You can download it too. ListIcon could be viewed as a 'plus' version of a ListView.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Modify ListViewGadget - can it be done
For ListIon or ListView, it might be possible to control scroll smoothness using a SCROLLINFO structure. I have never done this myself but there is probably some code on the forum.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.


