Spread for ASP.NET 7.0 Product Documentation
EnabledImgUrl Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > CreateButtonEventArgs Class : EnabledImgUrl Property


Glossary Item Box

Gets or sets the URL of the image to display in the command button if the button is active.

Syntax

Visual Basic (Declaration) 
Public Property EnabledImgUrl As String
Visual Basic (Usage)Copy Code
Dim instance As CreateButtonEventArgs
Dim value As String
 
instance.EnabledImgUrl = value
 
value = instance.EnabledImgUrl
C# 
public string EnabledImgUrl {get; set;}

Property Value

String containing the URL of the image

Remarks

The image file can be located anywhere that can be defined by a URL path.

Tip: Because only files that are part of the project are deployed with the application, we recommend that you add the image file for the button to your project.

Use the DisabledImgUrl property to specify the image to display in a command button if the button is disabled.

Example

This example sets the image to display if the Update button is enabled.
C#Copy Code
private void FpSpread1CreateButton(object sender, FarPoint.Web.Spread.CreateButtonEventArgs e)
{
    bool b;
    if(e.Command == "Update")
    {
        b = e.Disabled;
        if(b = true)
        {
            e.EnabledImgUrl = "Images/checked.gif";
        }
    }
}
Visual BasicCopy Code
Private Sub FpSpread1CreateButton(ByVal sender As Object, ByVal e As FarPoint.Web.Spread.CreateButtonEventArgs) Handles FpSpread1.CreateButton
    Dim b As Boolean
    If e.Command = "Update" Then
        b = e.Disabled
        If b = True Then
            e.EnabledImgUrl = "Images/checked.gif"
        End If
    End If
End Sub

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.