Page 1 of 1

Styling Geyser box: 'setStyleSheet' (a nil value)

Posted: Fri Feb 05, 2021 5:51 pm
by jwrobbs
I have successfully created the boxes I want. I'm successfully adding data.

I cannot style the boxes. I just want to add a little padding within the boxes so I don't have to make a ton of size and position adjustments to the boxes.

THE ISSUE is that I get this error: attempt to call method 'setStyleSheet' (a nil value)

Here is the relevant part of the script:

Code: Select all

Comms = Geyser.MiniConsole:new({
  name="Comms",
  x=-390, y="50%",
  autoWrap = true,
  color = "white",
  scrollBar = false,
  fontSize = sidebarFontSize,
  width=390, height="50%",
})

Comms:setStyleSheet([[
  background-color: yellow;
]])
Is the issue that I'm making a miniConsole? If so how do I add padding?

Or is there an entirely different and better approach?

Re: Styling Geyser box: 'setStyleSheet' (a nil value)

Posted: Fri Feb 05, 2021 6:42 pm
by jwrobbs
Ok, so that looks like the wrong approach. MiniConsoles are not stylable.

Can you put miniConsoles in containers like labels or other containers? If so, how?

Re: Styling Geyser box: 'setStyleSheet' (a nil value)

Posted: Fri Feb 05, 2021 7:58 pm
by Vadi
Hey! Yeah, you can put miniconsoles in a container - same way like labels, specify the parent container as the last argument to :new().