التعلُّم
Engine Class
StyleBase
Not Creatable

*This content will be available in your selected language soon.


Summary
Methods
InsertStyleRule(rule: StyleRule,priority: number?):()
SetStyleRules(rules: Instances):()
Inherited Members
Inherited by

API Reference
Methods
GetStyleRules
Capabilities: UI
StyleBase:GetStyleRules():{StyleRule}
Returns

InsertStyleRule
Capabilities: UI
StyleBase:InsertStyleRule(
rule:StyleRule, priority:number?
):()
Parameters
priority:number?
Returns
()

SetStyleRules
Capabilities: UI
StyleBase:SetStyleRules(rules:Instances):()
Parameters
rules:Instances
Returns
()
Code Samples
Set Style Rules
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local coreSheet = Instance.new("StyleSheet")
coreSheet.Name = "CoreSheet"
coreSheet.Parent = ReplicatedStorage
local styleRuleA = Instance.new("StyleRule")
styleRuleA.Selector = "Frame"
styleRuleA:SetProperty("BackgroundColor3", Color3.new(1, 0, 0))
local styleRuleB = Instance.new("StyleRule")
styleRuleB.Selector = "Frame"
styleRuleB:SetProperty("BackgroundColor3", Color3.new(0, 1, 0))
coreSheet:SetStyleRules({ styleRuleA, styleRuleB })

Events
StyleRulesChanged
Capabilities: UI
StyleBase.StyleRulesChanged():RBXScriptSignal

©2026 شركة Roblox Corporation. تُعد منصّة Roblox، وشعار Roblox وشعار "توسيع حدود المخيلة"، من ضمن علاماتنا التجارية المسجّلة وغير المسجّلة في الولايات المتحدة وبلدان أخرى.