RectangleHotSpot.Bottom プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > RectangleHotSpot.Bottom プロパティの意味・解説 

RectangleHotSpot.Bottom プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

RectangleHotSpot オブジェクト定義される四角形領域下辺y 座標取得または設定します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

解説解説

Bottom プロパティ使用すると、この RectangleHotSpot オブジェクト定義される四角形領域下辺y 座標を表す値を取得または設定できますRectangleHotSpot オブジェクトを完全に定義するには、このプロパティLeftTop、および Right の各プロパティの値を指定する必要があります

使用例使用例

2 つRectangleHotSpot オブジェクトを含む ImageMap コントロールを、宣言によって作成する方法次のコード例示します1 つRectangleHotSpot オブジェクト宣言によって作成されBottom プロパティを含むプロパティ宣言によって設定されます。もう 1 つRectangleHotSpot オブジェクトプログラムによって作成されBottom プロパティを含むプロパティプログラムによって設定されます。この例を正常に動作させるには、ImageUrl プロパティユーザー独自のイメージ提供しアプリケーションがそのイメージを見つけられるように、イメージへのパス適切に更新する必要があります

<%@ page language="VB" %>

<script runat="server">
  
  Sub Page_Load(ByVal sender As
 Object, ByVal e As EventArgs)

    ' Programmatically create a RectangleHotSpot.
    Dim Rectangle1 As New
 RectangleHotSpot
    
    ' Set properties on Rectangle1.
    Rectangle1.Top = 0
    Rectangle1.Left = 0
    Rectangle1.Bottom = 200
    Rectangle1.Right = 200
    Rectangle1.PostBackValue = "Yes"
    Rectangle1.AlternateText = "Vote yes"
         
    ' Add the RectangleHotSpot object to the
    ' Vote ImageMap control's HotSpotCollection.
    Vote.HotSpots.Add(Rectangle1)
  
  End Sub
    
  Sub VoteMap_Clicked(ByVal sender As
 Object, ByVal e As ImageMapEventArgs)
            
    ' When a user clicks the "Yes" hot spot,
    ' display the hot spot's value.
    If (e.PostBackValue = "Yes")
 Then
      Message1.Text = "You selected " & e.PostBackValue
 & "."
       
      ' When a user clicks the "No" hot spot,
      ' display the hot spot's value.
    ElseIf (e.PostBackValue = "No")
 Then
      Message1.Text = "You selected " & e.PostBackValue
 & "."
      
    Else
      Message1.Text = "You did not click a valid hot spot region."
                
    End If
  End Sub
  
</script>

<html>
<head id="Head1" runat="server">
  <title>RectangleHotSpot Properties Example</title>
</head>
  <body>
    <form id="Form1" runat="server">
    
      <h3>RectangleHotSpot Properties Example</h3>
      
      <!-- Change or remove the width and
 height attributes as
           appropriate for your image. -->
      <asp:imagemap id="Vote"           
        imageurl="Images/VoteImage.jpg" 
        alternatetext="Voting choices"
        hotspotmode="PostBack"
        width="400"
        height="200"
        onclick="VoteMap_Clicked"   
        runat="Server">            
        
        <asp:RectangleHotSpot 
          top="0"
          left="201"
          bottom="200"
          right="400"
          postbackvalue="No"
          alternatetext="Vote no">
        </asp:RectangleHotSpot>
        
      </asp:imagemap>
      
      <br />
      
      <asp:label id="Message1"
        runat="Server">
      </asp:label>
              
    </form>      
  </body>
</html>
<%@ page language="C#" %>

<script runat="server">
  void Page_Load(object sender, EventArgs e)
  {
    // Programmatically create a RectangleHotSpot.
    RectangleHotSpot Rectangle1 = new RectangleHotSpot();
    
    // Set properties on Rectangle1.
    Rectangle1.Top = 0;
    Rectangle1.Left = 0;
    Rectangle1.Bottom = 200;
    Rectangle1.Right = 200;
    Rectangle1.PostBackValue = "Yes";
    Rectangle1.AlternateText = "Vote yes";
         
    // Add the RectangleHotSpot object to the
    // Vote ImageMap control's HotSpotCollection.
    Vote.HotSpots.Add(Rectangle1);  
  }
  
  void VoteMap_Clicked(object sender, ImageMapEventArgs e)
  {       
    // When a user clicks the "Yes" hot spot,
    // display the hot spot's value.
    if (e.PostBackValue == "Yes")
      Message1.Text = "You selected " + e.PostBackValue + ".";

    else if (e.PostBackValue == "No")
 
      // When a user clicks the "No" hot spot,
      // display the hot spot's value.       
      Message1.Text = "You selected " + e.PostBackValue + ".";
      
    else
      Message1.Text = "You did not click a valid hot spot region.";
                
  }

</script>

<html>
<head id="Head1" runat="server">
  <title>RectangleHotSpot Properties Example</title>
</head>
  <body>
    <form id="Form1" runat="server">
    
      <h3>RectangleHotSpot Properties Example</h3>
      
      <!-- Change or remove the width and height attributes as
           appropriate for your image. -->
      <asp:imagemap id="Vote"           
        imageurl="Images/VoteImage.jpg" 
        alternatetext="Voting choices"
        hotspotmode="PostBack"
        width="400"
        height="200"
        onclick="VoteMap_Clicked"   
        runat="Server">            
        
        <asp:RectangleHotSpot 
          top="0"
          left="201"
          bottom="200"
          right="400"
          postbackvalue="No"
          alternatetext="Vote no">
        </asp:RectangleHotSpot>
        
      </asp:imagemap>
      
      <br />
      
      <asp:label id="Message1"
        runat="Server">
      </asp:label>
              
    </form>      
  </body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「RectangleHotSpot.Bottom プロパティ」の関連用語

RectangleHotSpot.Bottom プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



RectangleHotSpot.Bottom プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS