PDA

View Full Version : [CLOSED] Margins not functional on ImageButton



SFritsche
Mar 12, 2013, 3:55 AM
I would like to have my image buttons separated, and for other objects I use the Margins. However, in 2.1, the Margins key word appears to be ignored.



<%@ Page Title="" Language="C#" %>
<%@Import Namespace="System.Net"%>
<%@Import Namespace="System.IO"%>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title />
<meta http-equiv="Content-Language" content="en-us"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<ext:ResourceManager ID="rm1" runat="server" />
<body>
<ext:Panel runat="server" Width="185" BodyStyle="background-color: transparent;" CtCls="loginTable" TitleCollapse="true" Border="false" MinButtonWidth="25">
<Items>
<ext:ImageButton ID="btnLogin" runat="server" ImageUrl="images\buttons\login.png" OverImageUrl="..\images\buttons\loginOver.png" Margins="5 5 5 5" />
<ext:ImageButton ID="btnForgot" runat="server" ImageUrl="images\buttons\forgot.png" OverImageUrl="..\images\buttons\forgotOver.png" Margins="5 5 5 5" />
</Items>
</ext:Panel>
</body>
</html>


Thanks.
-Steve

Daniil
Mar 12, 2013, 6:56 AM
Hi Steve,

The Margins property is used by Box layouts (HBox and VBox) and Border one.

In your case using an HBox one looks appropriate.

SFritsche
Mar 12, 2013, 5:11 PM
That solves it. Thanks.

-Steve