Disable scrollbar
Disable scrollbar
Is there any way to disable the scrollbars, ie make the actual scrollbar disappear and just have the background left? I'm looking for a cross platform solution.
Re: Disable scrollbar
You didn't mention which Gadget you want to disable the scroll bar
Anyway you can use your gadget inside a ContainerGadget() with less dimensions to do not show the the scroll bar
I hope it's a cross platform solution
Or wait for Shardik to post a cross platform API solution
Anyway you can use your gadget inside a ContainerGadget() with less dimensions to do not show the the scroll bar
I hope it's a cross platform solution
Or wait for Shardik to post a cross platform API solution
Egypt my love
Re: Disable scrollbar
I think it's a canvas gadget. I'm looking at years old code o.O
Re: Disable scrollbar
Hi coco2
But CanvasGadget doesn't have a scroll bar
Can you post a simple snippet to show us what you want to do ?
Anyway with PB every thing is possible
But CanvasGadget doesn't have a scroll bar
Can you post a simple snippet to show us what you want to do ?
Anyway with PB every thing is possible
Egypt my love
Re: Disable scrollbar
Hi Rashad,
If you run this code you will see the scrollbar is maximum size meaning you can't move it left or right. I am wondering since the scrollbar is "maxed out" can it be disabled to show that you cannot scroll. Or do you think it is better to have the scrollbar there?
If you run this code you will see the scrollbar is maximum size meaning you can't move it left or right. I am wondering since the scrollbar is "maxed out" can it be disabled to show that you cannot scroll. Or do you think it is better to have the scrollbar there?
Code: Select all
OpenWindow(0, 0, 0, 400, 400, "Test Scrollbar", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ScrollBarGadget(0, 10, 380, 380, 20, 0, 32, 8)
SetGadgetAttribute(0, #PB_ScrollBar_Maximum, 0)
SetGadgetAttribute(0, #PB_ScrollBar_PageLength, 1)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Re: Disable scrollbar
Code: Select all
OpenWindow(0, 0, 0, 400, 400, "Test Scrollbar", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ScrollBarGadget(0, 10, 380, 380, 20, 0, 32, 8)
SetGadgetAttribute(0, #PB_ScrollBar_Maximum, 0)
SetGadgetAttribute(0, #PB_ScrollBar_PageLength, 1)
If GetGadgetAttribute(0, #PB_ScrollBar_Maximum) < GetGadgetAttribute(0, #PB_ScrollBar_PageLength)
DisableGadget(0, 1 )
EndIf
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
Re: Disable scrollbar
Thanks code works perfectly for me 


