EMCO tab styling after embedded into a label.

Post Reply
Aydein
Posts: 27
Joined: Wed Sep 13, 2017 8:45 pm

EMCO tab styling after embedded into a label.

Post by Aydein »

So I've been messing with a gui based on the template from Akayan I found on the forums here. I've embedded EMCO into one of the labels but I cannot for the life of me figure out how to format the tabs themselves in order to make them bigger (so the text is correctly displayed.) I wanted to make the tabs slightly taller as well as lower the font size of them but I was also hoping that I'd be able to set the styling of the tabs and whatever I append to the console seperately. I've included a screen shot, it's on the bottom left, as well as the EMCO code. To be clear, the tabs were doing this even when placed outside of a label. Please advise. I've tried playing with the local stylesheets set here but nothing seems to affect the text. I've been through a lot of documentation and I cannot figure out where I'm going astray.
Image

Code: Select all

local EMCO = require("MDK.emco")
chatcon = Geyser.Container:new({
  x = "6",
  y = "10",
  height = "96%",
  width = "98.2%",
},GUI.Box7)

local stylesheet = [[background-color: rgb(0,0,0,255); border-width: 1px; border-style: solid; border-color: gold; border-radius: 10px;]]
local istylesheet = [[background-color: rgb(0,0,0,255); border-width: 1px; border-style: solid; border-color: gold; border-radius: 10px;]]
testEMCO = EMCO:new({
  x = "6",
  y = "5",
  width = "99%",
  height = "97%",
  allTab = true,
  allTabName = "All",
  gap = 2,
  consoleColor = "black",
  consoles = {
    "All",
    "Says", 
    "Tells",
    "Orgs",
    "Misc",
  },
  activeTabCSS = stylesheet,
  inactiveTabCSS = istylesheet,
}, chatcon)

User avatar
demonnic
Posts: 767
Joined: Sat Dec 05, 2009 3:19 pm

Re: EMCO tab styling after embedded into a label.

Post by demonnic »

The constraint to control how tall the tabs are is tabHeight , and it defaults to 25. If you set that to something higher it should make the tabs themselves taller. tabFontSize controls the size of the fonts in the tabs, and (in)activeTabFGColor constraints control the color of the text on the tabs.

The CSS controls things like the border color, radius, background color and/or gradients if you wanna set them.

Hope that helps clear it up a bit, let me know if there's something I missed, still getting over a cold so may've missed something. These constraints are all listed at https://demonnic.github.io/mdk/current/ ... l#EMCO:new as well. Though there are a lot of them

Aydein
Posts: 27
Joined: Wed Sep 13, 2017 8:45 pm

Re: EMCO tab styling after embedded into a label.

Post by Aydein »

demonnic wrote:
Fri Jul 23, 2021 7:32 pm
The constraint to control how tall the tabs are is tabHeight , and it defaults to 25. If you set that to something higher it should make the tabs themselves taller. tabFontSize controls the size of the fonts in the tabs, and (in)activeTabFGColor constraints control the color of the text on the tabs.

The CSS controls things like the border color, radius, background color and/or gradients if you wanna set them.

Hope that helps clear it up a bit, let me know if there's something I missed, still getting over a cold so may've missed something. These constraints are all listed at https://demonnic.github.io/mdk/current/ ... l#EMCO:new as well. Though there are a lot of them
Thank you so much again. This did the trick. Now I just have to make it capture properly now. I was so hung up on those tabs that I just left it alone until I could find the remedy.

As a side question, would the stylesheet also control the scrollbar?

User avatar
demonnic
Posts: 767
Joined: Sat Dec 05, 2009 3:19 pm

Re: EMCO tab styling after embedded into a label.

Post by demonnic »

The scrollbars come from the consoles and can be modified as part of a setProfileStyleSheet but I do not think you can modify them per-console.

I'm not sure what the property for that is off hand though.

Aydein
Posts: 27
Joined: Wed Sep 13, 2017 8:45 pm

Re: EMCO tab styling after embedded into a label.

Post by Aydein »

demonnic wrote:
Fri Jul 23, 2021 10:56 pm
The scrollbars come from the consoles and can be modified as part of a setProfileStyleSheet but I do not think you can modify them per-console.

I'm not sure what the property for that is off hand though.
After some digging and looking at other peoples work, I finally figured that one out. Thank you again for all your help and I hope you feel better soon.

Post Reply