Register | Login

ZettaCube Forum and Knowledge Base

Welcome to ZettaCube forum. Here you can discuss various issues regarding our ZeeControls product. If you want to contact our developers directly, please email to support@zettacube.com.

Please register to post a message. Registration is immediate and free. Return users please login here.

 
  Forum  Discussions  Web Splitter  Can I set a 1 pixel wide splitter?
Previous Previous
 
Next Next
New Post 12/10/2008 12:49 AM
  aaa
3 posts
No Ranking


Can I set a 1 pixel wide splitter? 

Hi,

I'm trying to use the web splitter as a layout tool.  I turned off the Resizable property of the panels, and set the SplitterProps.Thickness to 1.  But there is still a 4 pixel wide splitter there.  If I set the thickness to 0, there will be a 2 pixel wide splitter.

Is there a fix?

Thank you.

 

 
New Post 12/10/2008 2:44 AM
  ZettaCube Support
64 posts
No Ranking


Re: Can I set a 1 pixel wide splitter? 

Dear aaa,

I think the extra pixels are due to the panel borders.  If you don't specify any CssClass in the container or the panels, WebSplitter will apply certain default styles.  The default panel styles include a border of 1px, so boths sides of the splitter bar will have a total 2px of borders.

To turn off panel borders, either set a new CssClass to the panels, or override the border style in the default classes (ZCWSPanel and ZCWSParentPanel) as follows:

    <style type="text/css">
        .ZCWSPanel, .ZCWSParentPanel {
            border:0px;
        }
    </style>

The default background color of the splitter, which is Beige, might be difficult to see once the panel border is gone.  You can set another color as follows. Moreover, you can set the SplitterProps.ThicknessWhenDisabled property instead of the Thickness property, so that only splitters adjacent to non-resizable panels will have a thickness of 1px, and others will maintain the default of 4pxs.
 
    <SplitterProps ThicknessWhenDisabled="1" Thickness="4" BackColor="black" />
 
Regards
 
ZettaCube Support
 

 
New Post 12/10/2008 3:33 AM
  aaa
3 posts
No Ranking


Re: Can I set a 1 pixel wide splitter? 

Hi,

I followed your suggestions.  While the borders went away as expected, the splitter's color didn't change.  And the strange thing is that now the Thickness property has no effect (it works before).

Here's the aspx.  Pls help.

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ZeeControlsTest.WebForm1" %>

<%@ Register Assembly="ZettaCube.ZeeControls" Namespace="ZettaCube.ZeeControls" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
<style type="text/css">
        .ZCWSPanel, .ZCWSParentPanel {
            border:0px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <cc1:WebSplitterContainer ID="WebSplitterContainer1" runat="server" FitParent="FitWindow"
            Height="695px" Orientation="Horizontal" Width="856px"><Panels>
<cc1:WebSplitterPanel runat="server" Filled="True" ><Content>
<cc1:WebSplitterContainer id="WebSplitterContainer2" runat="server" width="200px" height="200px" FitParent="FitParentContainer"><Panels>
<cc1:WebSplitterPanel runat="server" PreferredSize="200" Resizable="False" ><Content>
Tree menu goes here
</Content>
</cc1:WebSplitterPanel>
<cc1:WebSplitterPanel runat="server" Filled="True" ><Content>
Content goes here
</Content>
</cc1:WebSplitterPanel>
</Panels>
    <SplitterProps BackColor="0, 0, 0" ThicknessWhenDisabled="1" />
</cc1:WebSplitterContainer>
</Content>
</cc1:WebSplitterPanel>
<cc1:WebSplitterPanel runat="server" CanCollapse="Forward" PreferredSize="250" ><Content>
Admin info goes here
</Content>
</cc1:WebSplitterPanel>
</Panels>
</cc1:WebSplitterContainer>
   
    </div>
    </form>
</body>
</html>
 

 
New Post 12/10/2008 3:48 AM
  ZettaCube Support
64 posts
No Ranking


Re: Can I set a 1 pixel wide splitter? 

Dear aaa,

This is because the splitter properties were set in the nested splitter container, while by default, nested containers inherits splitter properties from the parent container, if any.

To break the inheritance, please add InheritSplitterProps="false" to the nested container:

    <cc1:WebSplitterContainer id="WebSplitterContainer2" runat="server" width="200px" height="200px" FitParent="FitParentContainer" InheritSplitterProps="false">

 

Hope this helps.

 

Regards

ZettaCube Support

 
New Post 12/10/2008 4:03 AM
  aaa
3 posts
No Ranking


Re: Can I set a 1 pixel wide splitter? 

Yes, that helped!!

I didn't have the parent/nested containers before, so that's why the Thickness setting worked previously.  (Now all work fine)

Thanks.

 
Previous Previous
 
Next Next
  Forum  Discussions  Web Splitter  Can I set a 1 pixel wide splitter?
Copyright 2009 by ZettaCube Limited