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

Share your scripts and packages with other Mudlet users.
Post Reply
jwrobbs
Posts: 21
Joined: Sat Sep 23, 2017 1:26 am

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

Post 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?

jwrobbs
Posts: 21
Joined: Sat Sep 23, 2017 1:26 am

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

Post 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?

User avatar
Vadi
Posts: 4961
Joined: Sat Mar 14, 2009 3:13 pm

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

Post 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().

Post Reply