button visible/not visible

Discussion in 'ASP .Net' started by tshad, Oct 26, 2004.

  1. tshad

    tshad Guest

    I have 2 buttons:

    <asp:ImageButton ID="ExpandButton" runat="server"
    Font-Size="2" ImageUrl="../images/expand.jpg" Width="16" Height="16"
    CommandName="Select" AlternateText="Click here to see
    details"></asp:ImageButton>
    <asp:ImageButton ID="CollapseButton" visible="false"
    runat="server" Font-Size="2" ImageUrl="../images/collapse.jpg" Width="16"
    Height="16" CommandName="Select" AlternateText="Click here to see
    details"></asp:ImageButton>

    One is an image of a "+" and on is an image of a "-".

    They are next to each other. What I am doing is trying to make the "+"
    disappear and the "-" appear indented when the "+" button is pushed.

    If I just make the "+" button invisible, the minus button moves to the left
    and the "-" button just takes its place. How can I make the "+" button
    invisible and the "-" button visible and indented?

    Thanks,

    Tom.
     
    tshad, Oct 26, 2004
    #1
    1. Advertising

  2. tshad

    Brian Hoops Guest

    Insert a 16x16 place holder of some sort and make it visible when the expand
    isn't.


    "tshad" <> wrote in message
    news:...
    >I have 2 buttons:
    >
    > <asp:ImageButton ID="ExpandButton" runat="server"
    > Font-Size="2" ImageUrl="../images/expand.jpg" Width="16" Height="16"
    > CommandName="Select" AlternateText="Click here to see
    > details"></asp:ImageButton>
    > <asp:ImageButton ID="CollapseButton" visible="false"
    > runat="server" Font-Size="2" ImageUrl="../images/collapse.jpg" Width="16"
    > Height="16" CommandName="Select" AlternateText="Click here to see
    > details"></asp:ImageButton>
    >
    > One is an image of a "+" and on is an image of a "-".
    >
    > They are next to each other. What I am doing is trying to make the "+"
    > disappear and the "-" appear indented when the "+" button is pushed.
    >
    > If I just make the "+" button invisible, the minus button moves to the
    > left and the "-" button just takes its place. How can I make the "+"
    > button invisible and the "-" button visible and indented?
    >
    > Thanks,
    >
    > Tom.
    >
     
    Brian Hoops, Oct 26, 2004
    #2
    1. Advertising

  3. Instead of making "+" completely invisible,in javascript function use
    obj.visible='hidden',obj.display='block'(instead of none);
    try this out...


    "tshad" wrote:

    > I have 2 buttons:
    >
    > <asp:ImageButton ID="ExpandButton" runat="server"
    > Font-Size="2" ImageUrl="../images/expand.jpg" Width="16" Height="16"
    > CommandName="Select" AlternateText="Click here to see
    > details"></asp:ImageButton>
    > <asp:ImageButton ID="CollapseButton" visible="false"
    > runat="server" Font-Size="2" ImageUrl="../images/collapse.jpg" Width="16"
    > Height="16" CommandName="Select" AlternateText="Click here to see
    > details"></asp:ImageButton>
    >
    > One is an image of a "+" and on is an image of a "-".
    >
    > They are next to each other. What I am doing is trying to make the "+"
    > disappear and the "-" appear indented when the "+" button is pushed.
    >
    > If I just make the "+" button invisible, the minus button moves to the left
    > and the "-" button just takes its place. How can I make the "+" button
    > invisible and the "-" button visible and indented?
    >
    > Thanks,
    >
    > Tom.
    >
    >
    >
     
    =?Utf-8?B?SEFSSSBQUkFTRCBCQVJV?=, Oct 26, 2004
    #3
  4. tshad

    tshad Guest

    "Brian Hoops" <> wrote in message
    news:%...
    > Insert a 16x16 place holder of some sort and make it visible when the
    > expand isn't.


    How would I do this?

    I am trying to leave the back ground the same color as before and not put an
    actual image there.

    Thanks,

    Tom.
    >
    >
    > "tshad" <> wrote in message
    > news:...
    >>I have 2 buttons:
    >>
    >> <asp:ImageButton ID="ExpandButton" runat="server"
    >> Font-Size="2" ImageUrl="../images/expand.jpg" Width="16" Height="16"
    >> CommandName="Select" AlternateText="Click here to see
    >> details"></asp:ImageButton>
    >> <asp:ImageButton ID="CollapseButton" visible="false"
    >> runat="server" Font-Size="2" ImageUrl="../images/collapse.jpg" Width="16"
    >> Height="16" CommandName="Select" AlternateText="Click here to see
    >> details"></asp:ImageButton>
    >>
    >> One is an image of a "+" and on is an image of a "-".
    >>
    >> They are next to each other. What I am doing is trying to make the "+"
    >> disappear and the "-" appear indented when the "+" button is pushed.
    >>
    >> If I just make the "+" button invisible, the minus button moves to the
    >> left and the "-" button just takes its place. How can I make the "+"
    >> button invisible and the "-" button visible and indented?
    >>
    >> Thanks,
    >>
    >> Tom.
    >>

    >
    >
     
    tshad, Oct 26, 2004
    #4
  5. tshad

    Brian Hoops Guest

    I like Hari's javascript suggestion, however you could also make a 1x1
    transparent gif and then resize it to 16x16 on your page or use a 16x16
    panel.

    -Brian


    "tshad" <> wrote in message
    news:...
    > "Brian Hoops" <> wrote in message
    > news:%...
    >> Insert a 16x16 place holder of some sort and make it visible when the
    >> expand isn't.

    >
    > How would I do this?
    >
    > I am trying to leave the back ground the same color as before and not put
    > an actual image there.
    >
    > Thanks,
    >
    > Tom.
    >>
    >>
    >> "tshad" <> wrote in message
    >> news:...
    >>>I have 2 buttons:
    >>>
    >>> <asp:ImageButton ID="ExpandButton" runat="server"
    >>> Font-Size="2" ImageUrl="../images/expand.jpg" Width="16" Height="16"
    >>> CommandName="Select" AlternateText="Click here to see
    >>> details"></asp:ImageButton>
    >>> <asp:ImageButton ID="CollapseButton" visible="false"
    >>> runat="server" Font-Size="2" ImageUrl="../images/collapse.jpg"
    >>> Width="16" Height="16" CommandName="Select" AlternateText="Click here to
    >>> see details"></asp:ImageButton>
    >>>
    >>> One is an image of a "+" and on is an image of a "-".
    >>>
    >>> They are next to each other. What I am doing is trying to make the "+"
    >>> disappear and the "-" appear indented when the "+" button is pushed.
    >>>
    >>> If I just make the "+" button invisible, the minus button moves to the
    >>> left and the "-" button just takes its place. How can I make the "+"
    >>> button invisible and the "-" button visible and indented?
    >>>
    >>> Thanks,
    >>>
    >>> Tom.
    >>>

    >>
    >>

    >
    >
     
    Brian Hoops, Oct 28, 2004
    #5
  6. tshad

    tshad Guest

    "Brian Hoops" <> wrote in message
    news:...
    >I like Hari's javascript suggestion, however you could also make a 1x1
    >transparent gif and then resize it to 16x16 on your page or use a 16x16
    >panel.


    I like his, also.

    But how do you make a transparent gif? Is there a link that talks about it?

    Thanks,

    Tom
    >
    > -Brian
    >
    >
    > "tshad" <> wrote in message
    > news:...
    >> "Brian Hoops" <> wrote in message
    >> news:%...
    >>> Insert a 16x16 place holder of some sort and make it visible when the
    >>> expand isn't.

    >>
    >> How would I do this?
    >>
    >> I am trying to leave the back ground the same color as before and not put
    >> an actual image there.
    >>
    >> Thanks,
    >>
    >> Tom.
    >>>
    >>>
    >>> "tshad" <> wrote in message
    >>> news:...
    >>>>I have 2 buttons:
    >>>>
    >>>> <asp:ImageButton ID="ExpandButton" runat="server"
    >>>> Font-Size="2" ImageUrl="../images/expand.jpg" Width="16" Height="16"
    >>>> CommandName="Select" AlternateText="Click here to see
    >>>> details"></asp:ImageButton>
    >>>> <asp:ImageButton ID="CollapseButton" visible="false"
    >>>> runat="server" Font-Size="2" ImageUrl="../images/collapse.jpg"
    >>>> Width="16" Height="16" CommandName="Select" AlternateText="Click here
    >>>> to see details"></asp:ImageButton>
    >>>>
    >>>> One is an image of a "+" and on is an image of a "-".
    >>>>
    >>>> They are next to each other. What I am doing is trying to make the "+"
    >>>> disappear and the "-" appear indented when the "+" button is pushed.
    >>>>
    >>>> If I just make the "+" button invisible, the minus button moves to the
    >>>> left and the "-" button just takes its place. How can I make the "+"
    >>>> button invisible and the "-" button visible and indented?
    >>>>
    >>>> Thanks,
    >>>>
    >>>> Tom.
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    tshad, Oct 28, 2004
    #6
  7. tshad

    Brian Hoops Guest

    Try http://dragon.ep.usm.edu/~yuen/howto/gif.htm.

    -Brian


    "tshad" <> wrote in message
    news:...
    > "Brian Hoops" <> wrote in message
    > news:...
    >>I like Hari's javascript suggestion, however you could also make a 1x1
    >>transparent gif and then resize it to 16x16 on your page or use a 16x16
    >>panel.

    >
    > I like his, also.
    >
    > But how do you make a transparent gif? Is there a link that talks about
    > it?
    >
    > Thanks,
    >
    > Tom
    >>
    >> -Brian
    >>
    >>
    >> "tshad" <> wrote in message
    >> news:...
    >>> "Brian Hoops" <> wrote in message
    >>> news:%...
    >>>> Insert a 16x16 place holder of some sort and make it visible when the
    >>>> expand isn't.
    >>>
    >>> How would I do this?
    >>>
    >>> I am trying to leave the back ground the same color as before and not
    >>> put an actual image there.
    >>>
    >>> Thanks,
    >>>
    >>> Tom.
    >>>>
    >>>>
    >>>> "tshad" <> wrote in message
    >>>> news:...
    >>>>>I have 2 buttons:
    >>>>>
    >>>>> <asp:ImageButton ID="ExpandButton" runat="server"
    >>>>> Font-Size="2" ImageUrl="../images/expand.jpg" Width="16" Height="16"
    >>>>> CommandName="Select" AlternateText="Click here to see
    >>>>> details"></asp:ImageButton>
    >>>>> <asp:ImageButton ID="CollapseButton" visible="false"
    >>>>> runat="server" Font-Size="2" ImageUrl="../images/collapse.jpg"
    >>>>> Width="16" Height="16" CommandName="Select" AlternateText="Click here
    >>>>> to see details"></asp:ImageButton>
    >>>>>
    >>>>> One is an image of a "+" and on is an image of a "-".
    >>>>>
    >>>>> They are next to each other. What I am doing is trying to make the
    >>>>> "+" disappear and the "-" appear indented when the "+" button is
    >>>>> pushed.
    >>>>>
    >>>>> If I just make the "+" button invisible, the minus button moves to the
    >>>>> left and the "-" button just takes its place. How can I make the "+"
    >>>>> button invisible and the "-" button visible and indented?
    >>>>>
    >>>>> Thanks,
    >>>>>
    >>>>> Tom.
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
     
    Brian Hoops, Oct 28, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad

    Sections visible and not visible

    tshad, Jan 31, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    2,091
    tshad
    Jan 31, 2005
  2. Patrick Olurotimi Ige
    Replies:
    7
    Views:
    6,042
    Patrick Olurotimi Ige
    Jun 15, 2005
  3. tshad
    Replies:
    1
    Views:
    4,339
    tshad
    Oct 31, 2009
  4. Andrea Williams

    User control not visible when setting .Visible = true;

    Andrea Williams, Jan 26, 2004, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    562
    Andrea Williams
    Jan 28, 2004
  5. Jurjen de Groot
    Replies:
    0
    Views:
    330
    Jurjen de Groot
    May 19, 2008
Loading...

Share This Page