Spread Windows Forms 15.0
Spread Windows Forms 15.0 Product Documentation / Spread Designer Guide / Designing Shapes / Things to Do with Any Shape / Adding Hyperlink to a Shape
In This Topic
    Adding Hyperlink to a Shape
    In This Topic

    Hyperlinks can be added to shapes to redirect to the specified URL. The hyperlink dialog can be used to add or edit the hyperlink of a shape.

    The below example code shows how to add hyperlink to a shape.

    C#
    Copy Code
    fpSpread1.Features.EnhancedShapeEngine = true;
    // Add Shape Hyperlink
    IShape shp = fpSpread1.AsWorkbook().ActiveSheet.Shapes.AddShape(AutoShapeType.BentArrow, 300, 100, 100, 100);
    fpSpread1.AsWorkbook().ActiveSheet.Hyperlinks.Add(shp, null, "Sheet1!E1", "Click here to go to E1");
    

    VB
    Copy Code
    fpSpread1.Features.EnhancedShapeEngine = True
    ' Add Shape Hyperlink
    Dim shp As IShape = fpSpread1.AsWorkbook().ActiveSheet.Shapes.AddShape(AutoShapeType.BentArrow, 300, 100, 100, 100)
    fpSpread1.AsWorkbook().ActiveSheet.Hyperlinks.Add(shp, Nothing, "Sheet1!E1", "Click here to go to E1")
    

    UI Behavior

    A shape with a hyperlink can be selected by using Alt+click.

     

    See Also