[SOLVED] Style Not Being Applied to Text Buttons
Posted: Sun Jan 21, 2024 4:30 am
I am currently working on a project where I aim to implement a scroll bar for choices within a choice screen. To facilitate customization, I have crafted a specific style for the 'textbutton' to adjust attributes such as font size and color. Regrettably, this approach does not appear to be functioning as expected. I would greatly appreciate any insights or suggestions that could help me identify and resolve the underlying issue
Code: Select all
style scrollable_menu_frame:
background Null()
xsize 600
ysize 300
style large_textbutton:
font "KoPubDotumLight.ttf"
color "#FF0000"
size 20 # Increase font size as needed
screen scrollable_menu(choices):
frame style "scrollable_menu_frame":
xpos 1100
ypos 0.2
viewport:
id "viewport"
draggable True
mousewheel True
vbox:
spacing 20
for choice in choices:
textbutton choice[0] action choice[1] style "large_textbutton"
vbar:
value YScrollValue("viewport")
xpos 485