(Solved) How to increase the left margin for a vertical scrollbar in a vpgrid
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
- Regular
- Posts: 27
- Joined: Mon Jan 25, 2021 5:35 pm
- Contact:
(Solved) How to increase the left margin for a vertical scrollbar in a vpgrid
When creating a vpgrid the vertical scrollbar of that vpgrid is getting attached to the content of the grid, so how can I increase/change the margins for the scrollbar?
Last edited by andriodmactemporary on Tue Apr 06, 2021 9:21 am, edited 1 time in total.
Re: (Question) How to increase the left margin for a vertical scrollbar in a vpgrid
Hi, andriodmactemporary,
I think you should use right_margin as a property of the vpgrid. I believe margin is not used for the scrollbars.
I think you should use right_margin as a property of the vpgrid. I believe margin is not used for the scrollbars.
-
- Regular
- Posts: 27
- Joined: Mon Jan 25, 2021 5:35 pm
- Contact:
Re: (Question) How to increase the left margin for a vertical scrollbar in a vpgrid
Vpgrid won't support "right_margin" property, it's giving :
line 34: u'right_margin' is not a keyword argument or valid child for the vpgrid statement.
right_margin 100
^
line 34: u'right_margin' is not a keyword argument or valid child for the vpgrid statement.
right_margin 100
^
Re: (Question) How to increase the left margin for a vertical scrollbar in a vpgrid
That's strange. This works for me:andriodmactemporary wrote: ↑Tue Feb 09, 2021 11:43 pm Vpgrid won't support "right_margin" property, it's giving :
line 34: u'right_margin' is not a keyword argument or valid child for the vpgrid statement.
right_margin 100
^
Code: Select all
screen vpgrid_margins:
vpgrid:
cols 3
scrollbars "vertical"
draggable True
align(0.5, 0.5)
spacing 4
right_margin 10
for i in range(1,24):
frame:
xysize (300,300)
add Solid("#4f9")
text "hello"
colin r
➔ if you're an artist and need a bit of help coding your game, feel free to send me a PM
➔ if you're an artist and need a bit of help coding your game, feel free to send me a PM
-
- Regular
- Posts: 27
- Joined: Mon Jan 25, 2021 5:35 pm
- Contact:
Re: (Question) How to increase the left margin for a vertical scrollbar in a vpgrid
It's not working for me, below is my code you could go through it to resolve the problem. Thanks in advance
Code: Select all
vpgrid:
cols 3
rows 4
scrollbars "vertical"
right_margin 10 # Error u'right_margin' is not a keyword argument or valid child for the vpgrid statement
draggable True
mousewheel True
xalign 0.5
yalign 0.5
xspacing 75
yspacing 10
ymaximum 800
for i in range(0, 12):
frame:
style "gallerySlot"
imagebutton:
idle "shop_buying.png"
xalign 0.5
yalign 0.5
action Return()
Re: (Question) How to increase the left margin for a vertical scrollbar in a vpgrid
So, this does work for me. It's a cut-and-paste of your code, with only three edits:
1. wrapped in a `screen` statement
2. "gallerySlot" style commented out
3. the idle image replaced with a `Solid()` placeholder
Is your Ren'py install up-to-date? I'm testing on 7.4.0.
1. wrapped in a `screen` statement
2. "gallerySlot" style commented out
3. the idle image replaced with a `Solid()` placeholder
Is your Ren'py install up-to-date? I'm testing on 7.4.0.
Code: Select all
screen vpgrid_margins:
vpgrid:
cols 3
rows 4
scrollbars "vertical"
right_margin 10 # Error u'right_margin' is not a keyword argument or valid child for the vpgrid statement
draggable True
mousewheel True
xalign 0.5
yalign 0.5
xspacing 75
yspacing 10
ymaximum 800
for i in range(0, 12):
frame:
# style "gallerySlot"
imagebutton:
idle Solid("#afa",xysize=(200,200))
xalign 0.5
yalign 0.5
action Return()
colin r
➔ if you're an artist and need a bit of help coding your game, feel free to send me a PM
➔ if you're an artist and need a bit of help coding your game, feel free to send me a PM
-
- Regular
- Posts: 27
- Joined: Mon Jan 25, 2021 5:35 pm
- Contact:
Re: (Question) How to increase the left margin for a vertical scrollbar in a vpgrid
Thanks zmook I have updated the renpy to 4.2, it is working now.
Who is online
Users browsing this forum: Nozori_Games