button visible/not visible

T

tshad

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.
 
B

Brian Hoops

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

Guest

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

tshad

Brian Hoops said:
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.
 
B

Brian Hoops

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
 
T

tshad

Brian Hoops said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top