PageBase::SetSplitters

 

Description

Set splitters in the window based on the given configuration string. LT command "page -sps" is doing the same thing.

Syntax

BOOL SetSplitters( LPCSTR lpcszString )

Parameters

lpcszString
[input] Configuration string including splitter size proportion and the Origin C class name of the splitter child window or NULL to remove existing splitter.

Return

Returns TRUE on success and FALSE on failure.

Examples

EX1

int PageBase_SetSplitters_ex1(BOOL bShow = TRUE)
{
        WorksheetPage wp = Project.Pages(0);
        if( wp.IsValid() )
        {
                if( bShow )
                {
                        string strConfig = "r{50%}r[WkbookSplitter]";
                        wp.SetSplitters(strConfig);
                }
                else
                        wp.SetSplitters(NULL);
        }
        return 0;
}

EX2

int PageBase_SetSplitters_ex2(BOOL bShow = TRUE)
{
        WorksheetPage wp = Project.Pages(0);
        if( wp.IsValid() )
        {
                if( bShow )
                {
                        string strConfig = "c[ScriptPanel]{40%}c";
                        wp.SetSplitters(strConfig);
                }
                else
                        wp.SetSplitters(NULL);
        }
        return 0;
}

See Also

PageBase::GetSplitterInfo

Header to Include

origin.h