I would like to request a feature for the Code component, especially when used inside a Tab.
Problem
Right now, the Code component seems to grow based on its content. This makes it hard to use it as a console/log viewer inside a tab.
For example, I would like to create a log console that:
- fills the available width of the tab
- has a fixed height or fills the remaining vertical space
- keeps its size even when there are only a few log lines
- does not expand the whole tab when there are many logs
- scrolls internally inside the console area instead of making the entire tab scroll
At the moment, this does not seem possible through the public API.
Suggested API
It would be great if Tab:Code() supported options like:
local Console = Tab:Code({
Title = "Logs",
Code = "",
Width = UDim.new(1, 0),
Height = UDim.new(1, 0), -- or fixed pixel height
Fill = true,
Scrollable = true,
AutoScroll = true
})
Or maybe something like:
local Console = Tab:Code({
Title = "Logs",
Code = "",
Size = UDim2.new(1, 0, 1, 0),
MaxHeight = 400,
Scrollable = true,
AutoScroll = true
})
Use case
This would make it possible to build a proper console/log viewer:
local Console = LogsTab:Code({
Title = "Console",
Code = "",
Size = UDim2.new(1, 0, 1, 0),
Scrollable = true,
AutoScroll = true
})
Console:SetCode("[12:00:00] Started\n[12:00:01] Loaded modules")
The expected behavior would be:
- the code block stays inside the tab bounds
- the code area scrolls internally
- the tab layout does not grow infinitely
- new logs can optionally auto-scroll to the bottom
Why this would help
The Code component is very useful for displaying logs, debug output, console messages, script status, etc. Adding layout and scrolling options would make it much more flexible without requiring users to hack around the internal WindUI instances.
Thanks!
I would like to request a feature for the
Codecomponent, especially when used inside aTab.Problem
Right now, the
Codecomponent seems to grow based on its content. This makes it hard to use it as a console/log viewer inside a tab.For example, I would like to create a log console that:
At the moment, this does not seem possible through the public API.
Suggested API
It would be great if
Tab:Code()supported options like:Or maybe something like:
Use case
This would make it possible to build a proper console/log viewer:
The expected behavior would be:
Why this would help
The
Codecomponent is very useful for displaying logs, debug output, console messages, script status, etc. Adding layout and scrolling options would make it much more flexible without requiring users to hack around the internal WindUI instances.Thanks!