ScrollBarGadget bug?

Just starting out? Need help? Post your questions and find answers here.
User avatar
marcoagpinto
Addict
Addict
Posts: 1076
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

ScrollBarGadget bug?

Post 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


Image


Thanks!
User avatar
mk-soft
Always Here
Always Here
Posts: 6315
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: [PB 6.20 beta 3] ScrollBarGadget bug?

Post 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

My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
marcoagpinto
Addict
Addict
Posts: 1076
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: [PB 6.20 beta 3] ScrollBarGadget bug?

Post 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?
Image
User avatar
mk-soft
Always Here
Always Here
Posts: 6315
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: [PB 6.20 beta 3] ScrollBarGadget bug?

Post by mk-soft »

Window 10 is ok

Under Windows 11, the design has probably been changed
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [PB 6.20 beta 3] ScrollBarGadget bug?

Post 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
User avatar
marcoagpinto
Addict
Addict
Posts: 1076
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: [PB 6.20 beta 3] ScrollBarGadget bug?

Post 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 :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: :cry: :cry: :cry: :cry: :cry: :cry: :cry:
Post Reply