Page 1 of 1
ScrollBarGadget bug?
Posted: Sat Jan 18, 2025 4:33 pm
by marcoagpinto
Heya,
I get a blank space on the bottom of the scroll bar gadget.
I noticed this in the previous beta, but was unsure if it would be fixed in beta 3:
Code: Select all
Enumeration
#WINDOW_MAIN
#PANEL_BOX_DICTIONARY_VERTICAL_BAR
EndEnumeration
If OpenWindow(#WINDOW_MAIN,0,0,1024,600,"Proofing Tool GUI V"+current_version$+" build "+current_build$,#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_SizeGadget)=#False : MessageRequester("Error", "Can't open a window.", #PB_MessageRequester_Error) : EndIf
number_of_lines=2
ScrollBarGadget(#PANEL_BOX_DICTIONARY_VERTICAL_BAR,10,10,25-5-2,300-30+5+40,0,number_of_lines,number_of_lines,#PB_ScrollBar_Vertical)
Repeat
event=WaitWindowEvent()
Until event=#PB_Event_CloseWindow
Thanks!
Re: [PB 6.20 beta 3] ScrollBarGadget bug?
Posted: Sat Jan 18, 2025 6:07 pm
by mk-soft
No blank space ...
Code: Select all
Enumeration
#WINDOW_MAIN
#PANEL_BOX_DICTIONARY_VERTICAL_BAR
EndEnumeration
If OpenWindow(#WINDOW_MAIN,0,0,1024,600,"Proofing Tool GUI V"+current_version$+" build "+current_build$,#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_SizeGadget)
SetWindowColor(#WINDOW_MAIN,$FF901E)
number_of_lines=2
ScrollBarGadget(#PANEL_BOX_DICTIONARY_VERTICAL_BAR,10,10,25-5-2,300-30+5+40,0,number_of_lines,number_of_lines,#PB_ScrollBar_Vertical)
Repeat
event=WaitWindowEvent()
Until event=#PB_Event_CloseWindow
EndIf
Re: [PB 6.20 beta 3] ScrollBarGadget bug?
Posted: Sat Jan 18, 2025 6:28 pm
by marcoagpinto
mk-soft wrote: Sat Jan 18, 2025 6:07 pm
No blank space ...
Code: Select all
Enumeration
#WINDOW_MAIN
#PANEL_BOX_DICTIONARY_VERTICAL_BAR
EndEnumeration
If OpenWindow(#WINDOW_MAIN,0,0,1024,600,"Proofing Tool GUI V"+current_version$+" build "+current_build$,#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_SizeGadget)
SetWindowColor(#WINDOW_MAIN,$FF901E)
number_of_lines=2
ScrollBarGadget(#PANEL_BOX_DICTIONARY_VERTICAL_BAR,10,10,25-5-2,300-30+5+40,0,number_of_lines,number_of_lines,#PB_ScrollBar_Vertical)
Repeat
event=WaitWindowEvent()
Until event=#PB_Event_CloseWindow
EndIf
Maybe it is Windows 11 24H2 related?

Re: [PB 6.20 beta 3] ScrollBarGadget bug?
Posted: Sun Jan 19, 2025 12:43 pm
by mk-soft
Window 10 is ok
Under Windows 11, the design has probably been changed
Re: [PB 6.20 beta 3] ScrollBarGadget bug?
Posted: Wed Jan 29, 2025 7:05 pm
by Fred
As you are starting from 0, there is 3 slots, so a page length of 2 doesn't fill the whole scrollbar. It's the same on other OS (I checked Linux).
To have a full bar, you need to start from 1
Code: Select all
Enumeration
#WINDOW_MAIN
#PANEL_BOX_DICTIONARY_VERTICAL_BAR
EndEnumeration
If OpenWindow(#WINDOW_MAIN,0,0,1024,600,"Proofing Tool GUI V"+current_version$+" build "+current_build$,#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_SizeGadget)
SetWindowColor(#WINDOW_MAIN,$FF901E)
number_of_lines=2
ScrollBarGadget(#PANEL_BOX_DICTIONARY_VERTICAL_BAR,10,10,25-5-2,300-30+5+40,1,number_of_lines,number_of_lines, #PB_ScrollBar_Vertical)
Repeat
event=WaitWindowEvent()
If event = #PB_Event_Gadget
Debug GetGadgetState(#PANEL_BOX_DICTIONARY_VERTICAL_BAR)
EndIf
Until event=#PB_Event_CloseWindow
EndIf
Re: [PB 6.20 beta 3] ScrollBarGadget bug?
Posted: Wed Jan 29, 2025 8:41 pm
by marcoagpinto
Fred wrote: Wed Jan 29, 2025 7:05 pm
As you are starting from 0, there is 3 slots, so a page length of 2 doesn't fill the whole scrollbar. It's the same on other OS (I checked Linux).
To have a full bar, you need to start from 1
Code: Select all
Enumeration
#WINDOW_MAIN
#PANEL_BOX_DICTIONARY_VERTICAL_BAR
EndEnumeration
If OpenWindow(#WINDOW_MAIN,0,0,1024,600,"Proofing Tool GUI V"+current_version$+" build "+current_build$,#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_SizeGadget)
SetWindowColor(#WINDOW_MAIN,$FF901E)
number_of_lines=2
ScrollBarGadget(#PANEL_BOX_DICTIONARY_VERTICAL_BAR,10,10,25-5-2,300-30+5+40,1,number_of_lines,number_of_lines, #PB_ScrollBar_Vertical)
Repeat
event=WaitWindowEvent()
If event = #PB_Event_Gadget
Debug GetGadgetState(#PANEL_BOX_DICTIONARY_VERTICAL_BAR)
EndIf
Until event=#PB_Event_CloseWindow
EndIf
Ahhhhhh.... Fred, okay.
Sorry for being posting bug reports all the time
