Skip to content
Roblox API Reference

ImageButton

A 2D user interface element that displays an interactive image.
Memory category
Gui
Own members
19
Inherited members
176
Subclasses
0
Siblings
2

Properties109

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Inherited fromGuiBase2d17

Property categoryData

Property categoryDebugging

Property categoryLocalization

Property categorySelection

Inherited fromGuiObject39

Property categoryAppearance

Property categoryBehavior

  • Determines if descendant GuiObjects outside of the bounds of a parent GUI element should render.
    • Read capabilities: UI
  • Deprecated: This property is deprecated. Use UIDragDetector instead, as it supports more input types and can be better customized.
    Determines whether a GuiObject (and its descendants) can be dragged around the screen.
    • Deprecated
    • Read capabilities: UI

Property categoryData

Property categoryEventReplicator

Property categorySelection

Property categoryState

Inherited fromGuiButton12

Property categoryData

Property categoryEventReplicator

Property categoryHaptic

Property categorySelection

  • A boolean property which indicates whether the object has been selected.
    • Read capabilities: UI
Defined byImageButton18

Property categoryImage

  • ImageButton.ContentImageSize: Vector2 = Vector2.zero
    • Hidden
    • Read only
    • Roblox script security
    • Read capabilities: UI
  • ImageButton.HoverImage: string = ""
    A texture ID that will be used when the ImageButton is being hovered.
    • Read capabilities: UI
  • ImageButton.HoverImageContent: Content
    The image content that will be used when the ImageButton is being hovered. Only supports asset URIs.
    • Read capabilities: UI
  • ImageButton.Image: string = ""
    The image content displayed by the ImageButton element. Reads and writes to ImageContent.
    • Read capabilities: UI
  • ImageButton.ImageColor3: Color3 = Color3.new(1, 1, 1)
    Determines how a rendered image will be colorized.
    • Read capabilities: UI
  • ImageButton.ImageContent: Content
    The image content displayed by the UI element. Supports asset URIs and EditableImage objects.
    • Read capabilities: UI
  • ImageButton.ImageRectOffset: Vector2 = Vector2.zero
    The offset in pixels of the sub-area of an image to be displayed.
    • Read capabilities: UI
  • ImageButton.ImageRectSize: Vector2 = Vector2.zero
    Determines the size in pixels of the sub-area of an image to be displayed.
    • Read capabilities: UI
  • ImageButton.ImageTransparency: number = 0
    Determines the transparency of the rendered image.
    • Read capabilities: UI
  • ImageButton.IsLoaded: boolean = false
    Indicates whether the Image has finished loading from the Roblox website.
    • Read only
    • Read capabilities: UI
  • ImageButton.LocalizedImageContent: Content
    • Not replicated
    • Read: Roblox script security
    • Write: Not accessible
    • Read capabilities: UI
    • Load only
  • ImageButton.PressedImage: string = ""
    A texture ID that will be used when an ImageButton is being pressed.
    • Read capabilities: UI
  • ImageButton.PressedImageContent: Content
    The image content that will be used when an ImageButton is being pressed. Only supports asset URIs.
    • Read capabilities: UI
  • Selects the image resampling mode for the button.
    • Read capabilities: UI
  • ImageButton.ScaleType: Enum.ScaleType = Enum.ScaleType.Stretch
    Determines how an image will scale if displayed in a UI element whose size differs from the source image.
    • Read capabilities: UI
  • ImageButton.SliceCenter: Rect = Rect.new(0, 0, 0, 0)
    Sets the slice boundaries of a 9-sliced image.
    • Read capabilities: UI
  • ImageButton.SliceScale: number = 1
    Scales the 9-slice edges by the specified ratio.
    • Read capabilities: UI
  • ImageButton.TileSize: UDim2 = UDim2.new(1, 0, 1, 0)
    Sets the tiling scale of the ImageButton.
    • Read capabilities: UI

Methods49

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Inherited fromGuiObject6
Defined byImageButton1
  • ImageButton:SetEnableContentImageSizeChangedEvents(enabled: boolean)
    • Roblox script security
    • Capabilities: UI
    Parameters
    Parameter
    enabled: boolean

Events37

Inherited fromObject1
Inherited fromInstance9
Inherited fromGuiBase2d1
Inherited fromGuiObject18
Inherited fromGuiButton8