PDA

View Full Version : Sample: Splitter Framework


Worm
02-17-2006, 09:15 AM
Splitter Framework:
Thanks to Tig and Dermot for helping me with the code and optimization.

How To Use:
1. Add these function calls to the following Page Events
On Show

--Sets the splitter cursor to the NS/WE arrows
InitSplitters()


-- SetSplitterMinMax(Name of the Splitter,
-- Minimum X or Y value for for the Left or Top pane,
-- Minimum X or Y value for the Right or Bottom pane)

-- Example that will stop splitter movement
-- 10 pixels from either side of the page.
-- SetSplitterMinMax("vsplit_Vertical", 10, 10)


On Size

DoSplitter_OnSize(e_WindowWidth, e_WindowHeight, e_PageWidth, e_PageHeight, e_Type);


On Mouse Button

DoSplitter_MouseButton(e_Type, e_X, e_Y);


On Mouse Move

DoSplitter_MouseMove(e_X, e_Y);


2. Copy this code to your Global Functions

--[[************************************************** ******]]--
--[[************************************************** ******]]--
--[[****************** SPLITTER FRAMEWORK ******************]]--
--[[************************************************** ******]]--
--[[************************************************** ******]]--

--[[************************************************** ******]]--
--[[ SPLITTER EVENTS ]]--
--[[************************************************** ******]]--
function On_Splitter_Move(m_sSplitterName, m_nDiff)
-- use this function for your own actions
-- when a splitter is moved.


end


--[[************************************************** ******]]--
--[[ Set up a table to reference the objects in AMS ]]--
--[[************************************************** ******]]--
tbObjectType = {}
tbObjectType[OBJECT_BUTTON] = Button;
tbObjectType[OBJECT_LABEL] = Label;
tbObjectType[OBJECT_PARAGRAPH] = Paragraph;
tbObjectType[OBJECT_IMAGE] = Image;
tbObjectType[OBJECT_FLASH] = Flash;
tbObjectType[OBJECT_VIDEO] = Video;
tbObjectType[OBJECT_WEB] = Web;
tbObjectType[OBJECT_INPUT] = Input;
tbObjectType[OBJECT_HOTSPOT] = Hotspot;
tbObjectType[OBJECT_LISTBOX] = ListBox;
tbObjectType[OBJECT_COMBOBOX] = ComboBox;
tbObjectType[OBJECT_PROGRESS] = Progress;
tbObjectType[OBJECT_TREE] = Tree;
tbObjectType[OBJECT_PLUGIN] = Plugin;


-- Function to initialize the splitters with code to change the cursors
-- also initiates the table that holds the ratios for sizing objects
function InitSplitters()
m_nCursor = nil;
m_tblObjectData = {};
tblObjects = Page.EnumerateObjects();
if tblObjects then
for index, sObject in tblObjects do
if String.Left(sObject, 7) == "vsplit_" or String.Left(sObject, 7) == "hsplit_" then
--add the script to the object to set the cursor to NS/EW arrows
m_sScript = Page.GetObjectScript(sObject, "ON ENTER");
if String.Left(sObject, 1) == "v" then
m_sScript = "m_nCursor = 32644\r\n"..m_sScript;
else
m_sScript = "m_nCursor = 32645\r\n"..m_sScript;
end
m_sScript = Page.SetObjectScript(sObject, "ON ENTER", m_sScript);
m_sScript = Page.GetObjectScript(sObject, "ON LEAVE");
m_sScript = [[if not m_blnMoveSplitter then
m_nCursor = nil;
end]].."\r\n"..m_sScript;

m_sScript = Page.SetObjectScript(sObject, "ON LEAVE", m_sScript);
end
-- set the ratio data in a table
local Object = tbObjectType[Page.GetObjectType(sObject)];
local m_XR = Object.GetPos(sObject).X / Page.GetSize().Width;
local m_YR = Object.GetPos(sObject).Y / Page.GetSize().Height;
local m_WR = Object.GetSize(sObject).Width / Page.GetSize().Width;
local m_HR = Object.GetSize(sObject).Height / Page.GetSize().Height;
m_tblObjectData[Table.Count(m_tblObjectData) + 1] = {Name=sObject, PosXR=m_XR , PosYR=m_YR, SizeWR=m_WR, SizeHR=m_HR};
end
end
end


-- Function to set the splitters Min and Max X/Y values
function SetSplitterMinMax(sSplitter, nMin, nMax)
if m_tbMinMax == nil then
m_tbMinMax = {};
end
m_tbMinMax[Table.Count(m_tbMinMax) + 1] = {Splitter=sSplitter, Min=nMin, Max=nMax};
end


-- Function to tell whether a point is in a given
-- objects rectangle
function IsInRect(m_nX, m_nY, m_tblPos, m_tblSize)
local bReturn = false;
if (m_nX >= m_tblPos.X) and (m_nX <= m_tblPos.X + m_tblSize.Width) then
if (m_nY >= m_tblPos.Y) and (m_nY <= m_tblPos.Y + m_tblSize.Height) then
bReturn = true;
end
end
return bReturn;
end


-- Function to set the ratios of the objects on the page. These
-- values are used in positioning the objects and splitters in a Resize
function SetNewRatios()
local z;
for z=1, Table.Count(m_tblObjectData) do
local SplitterObject = tbObjectType[Page.GetObjectType(m_tblObjectData[z].Name)];
m_tblObjectData[z].PosXR = SplitterObject.GetPos(m_tblObjectData[z].Name).X / Page.GetSize().Width
m_tblObjectData[z].PosYR = SplitterObject.GetPos(m_tblObjectData[z].Name).Y / Page.GetSize().Height
m_tblObjectData[z].SizeWR = SplitterObject.GetSize(m_tblObjectData[z].Name).Width / Page.GetSize().Width
m_tblObjectData[z].SizeHR = SplitterObject.GetSize(m_tblObjectData[z].Name).Height / Page.GetSize().Height
end
end


-- Function to detect when a splitter has been selected
function DoSplitter_MouseButton(e_Type, e_X, e_Y)
local bReturn = false;
local Object = nil;

if e_Type == LEFT_BUTTON_DOWN then
-- Get the objects on the page
tblObjects = Page.EnumerateObjects();
--if there are objects, and we are not currently moving a splitter
if tblObjects and not m_blnMoveSplitter then
for index, sObject in tblObjects do
--if the object is a splitter
if (String.Left(sObject, 7) == "vsplit_") or (String.Left(sObject, 7) == "hsplit_") then
--get the object type
Object = tbObjectType[Page.GetObjectType(sObject)];
--if our mouse pointer is inside of a splitters rectangle
if IsInRect(e_X, e_Y, Object.GetPos(sObject), Object.GetSize(sObject)) then
if not m_blnMoveSplitter then
--Get the initial Original Positions and Size
m_nOrigX = Object.GetPos(sObject).X;
m_nOrigY = Object.GetPos(sObject).Y;
m_nSplitterHeight = Object.GetSize(sObject).Height;
m_nSplitterWidth = Object.GetSize(sObject).Width;
end
--set the variables to allow the splitter to move
m_blnMoveSplitter = true;
m_sCurrentSplitter = sObject;
m_XOffset = e_X - Object.GetPos(sObject).X;
m_YOffset = e_Y - Object.GetPos(sObject).Y;
break;
end
end
end
end
else
-- we're no longer on a splitter, reset the variables that
-- allow the splitter to be moved.
m_nCursor = nil;
m_blnMoveSplitter = false;
SetNewRatios();
end
end


-- Function to move the splitter
function DoSplitter_MouseMove(e_X, e_Y)
local z;

if m_nCursor then
-- if we are over a splitter, set the cursor appropriately
local hCursor = DLL.CallFunction(_SystemFolder.."\\User32.dll", "LoadCursorA", "0, "..m_nCursor, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
local retVal = DLL.CallFunction(_SystemFolder.."\\User32.dll", "SetCursor", hCursor, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
end

if not System.IsKeyDown(1) then
m_blnMoveSplitter = false;
end

m_nDiff = 0;

if m_blnMoveSplitter then
-- set the application to *NOT* redraw for smoother
-- object movement
Application.SetRedraw(false)
-- get the current splitter's objecy type
local SplitterObject = tbObjectType[Page.GetObjectType(m_sCurrentSplitter)];

m_blnAllowMove = true;
if String.Left(m_sCurrentSplitter, 7) == "vsplit_" then
-- it's a vertical splitter
for z=1, Table.Count(m_tbMinMax) do
if m_sCurrentSplitter == m_tbMinMax[z].Splitter then
-- if we'ver reached the min or mac X value, do not allow
-- the splitter to be moved
if e_X - m_XOffset <= m_tbMinMax[z].Min or e_X + (SplitterObject.GetSize(m_sCurrentSplitter).Width - m_XOffset) >= Page.GetSize().Width - m_tbMinMax[z].Max then
m_blnAllowMove = false;
end
break;
end
end
if m_blnAllowMove then
-- Set the splitters position
SplitterObject.SetPos(m_sCurrentSplitter, e_X - m_XOffset, SplitterObject.GetPos(m_sCurrentSplitter).Y);
-- get the value of pixels the splitter was moved
m_nDiff = e_X - (m_nOrigX + m_XOffset);
for index, sObject in tblObjects do
Object = tbObjectType[Page.GetObjectType(sObject)];
-- if the object hasn't been designated to *NOT* move
if String.Left(sObject, 7) ~= "nomove_" then
-- if the object isn't another vertical splitter
if String.Left(sObject, 7) ~= "vsplit_" then
-- Move the objects
if (Object.GetPos(sObject).X <= m_nOrigX) and ((Object.GetPos(sObject).Y >= m_nOrigY) and (Object.GetPos(sObject).Y <= m_nOrigY + m_nSplitterHeight)) then
if Object.GetSize(sObject).Width + m_nDiff <=0 then
Object.SetSize(sObject, 0, Object.GetSize(sObject).Height);
Application.SetRedraw(true);
Object.SetVisible(sObject, false);
Page.Redraw();
Application.SetRedraw(false);
else
Object.SetVisible(sObject, true);
Object.SetSize(sObject, Object.GetSize(sObject).Width + m_nDiff, Object.GetSize(sObject).Height);
end
elseif (Object.GetPos(sObject).X >= m_nOrigX) and ((Object.GetPos(sObject).Y >= m_nOrigY) and (Object.GetPos(sObject).Y <= m_nOrigY + m_nSplitterHeight)) then
if Object.IsVisible(sObject) then
Object.SetPos(sObject, Object.GetPos(sObject).X + m_nDiff, Object.GetPos(sObject).Y );
Object.SetSize(sObject, Object.GetSize(sObject).Width - m_nDiff, Object.GetSize(sObject).Height);
end
end
end
end
end
-- set our splitters origanal position to the new position
m_nOrigX = m_nOrigX + m_nDiff;
end
elseif String.Left(m_sCurrentSplitter, 7) == "hsplit_" then
-- it's a Horizontal Splitter
for z=1, Table.Count(m_tbMinMax) do
if m_sCurrentSplitter == m_tbMinMax[z].Splitter then
-- if we'ver reached the min or mac X value, do not allow
-- the splitter to be moved
if e_Y - m_YOffset <= m_tbMinMax[z].Min or e_Y + (SplitterObject.GetSize(m_sCurrentSplitter).Height - m_YOffset) >= Page.GetSize().Height - m_tbMinMax[z].Max then
m_blnAllowMove = false;
end
break;
end
end
if m_blnAllowMove then
-- Set the splitters position
SplitterObject.SetPos(m_sCurrentSplitter, SplitterObject.GetPos(m_sCurrentSplitter).X, e_Y - m_YOffset);
-- get the value of pixels the splitter was moved
m_nDiff = e_Y - (m_nOrigY + m_YOffset);
for index, sObject in tblObjects do
Object = tbObjectType[Page.GetObjectType(sObject)];
-- if the object hasn't been designated to *NOT* move
if String.Left(sObject, 7) ~= "nomove_" then
-- if the object isn't another horizontal splitter
if String.Left(sObject, 7) ~= "hsplit_" then
-- Move the objects
if (Object.GetPos(sObject).Y <= m_nOrigY) and ((Object.GetPos(sObject).X >= m_nOrigX) and (Object.GetPos(sObject).X <= m_nOrigX + m_nSplitterWidth)) then
if Object.GetSize(sObject).Height + m_nDiff <= 0 then
Object.SetSize(sObject, Object.GetSize(sObject).Width, 0);
Application.SetRedraw(true);
Object.SetVisible(sObject, false);
Page.Redraw();
Application.SetRedraw(false);
else
Object.SetVisible(sObject, true);
Object.SetSize(sObject, Object.GetSize(sObject).Width, Object.GetSize(sObject).Height + m_nDiff);
end
elseif (Object.GetPos(sObject).Y >= m_nOrigY) and ((Object.GetPos(sObject).X >= m_nOrigX) and (Object.GetPos(sObject).X <= m_nOrigX + m_nSplitterWidth)) then
if Object.IsVisible(sObject) then
Object.SetPos(sObject, Object.GetPos(sObject).X, Object.GetPos(sObject).Y + m_nDiff );
Object.SetSize(sObject, Object.GetSize(sObject).Width, Object.GetSize(sObject).Height - m_nDiff);
end
end
end
end
end
-- set our splitters origanal position to the new position
m_nOrigY = m_nOrigY + m_nDiff;
end
end

-- fire event our own event
On_Splitter_Move(m_sCurrentSplitter, m_nDiff);

-- Allow the app to redraw
Application.SetRedraw(true);
-- Force redraw
Page.Redraw();
end
end


-- Function to Resize all objects and splitters
function DoSplitter_OnSize(e_WindowWidth, e_WindowHeight, e_PageWidth, e_PageHeight, e_Type)
if m_tblObjectData then
-- set redraw to false for smoother object moving
Application.SetRedraw(false)
for z=1, Table.Count(m_tblObjectData) do
m_Object = tbObjectType[Page.GetObjectType(m_tblObjectData[z].Name)];
-- if it's a vertical splitter, don't change its width
if String.Left(m_tblObjectData[z].Name, 7) == "vsplit_" then
m_Object.SetSize(m_tblObjectData[z].Name, m_Object.GetSize(m_tblObjectData[z].Name).Width, e_PageHeight * m_tblObjectData[z].SizeHR)
elseif String.Left(m_tblObjectData[z].Name, 7) == "hsplit_" then
-- if it's a horizontal splitter, don't change its height
m_Object.SetSize(m_tblObjectData[z].Name, e_PageWidth * m_tblObjectData[z].SizeWR, m_Object.GetSize(m_tblObjectData[z].Name).Height)
else
-- change the objects dimensions proportionately
m_Object.SetSize(m_tblObjectData[z].Name, e_PageWidth * m_tblObjectData[z].SizeWR, e_PageHeight * m_tblObjectData[z].SizeHR)
end
-- Set the objects position proportionately
m_Object.SetPos(m_tblObjectData[z].Name, e_PageWidth * m_tblObjectData[z].PosXR, e_PageHeight * m_tblObjectData[z].PosYR)
end
-- redraw!
Application.SetRedraw(true)
end
end



3. Add splitters to your page. The splitters can be any object that has an ON ENTER and ON LEAVE event. Rename your objects to the following convention:

The first 7 characters in the name of an Object that is a Vertical Splitter must be: "vsplit_"
The first 7 characters in the name of an Object that is a Horizontal Splitter must be: "hsplit_"

Once you've named your objects this way, the framework will automatically make them moveable splitters, nothing more to do.

4. Place the objects you want in each pane on the page, size them accordingly.

5. If you have an object that you do not want to be moved by the splitters, rename it to the following convention:

The first 7 characters in the name of an Object that should not be moved by a splitter must be: "nomove_"

6. In the Global Functions there is a code generated event named On_Splitter_Move. Use this event to manually move objects that are not handled correctly by the framework for your design.


Guidelines:
Just like in Ghost Busters, its important to not cross the streams, err splitters. The framework is designed to move/resize any object that falls within a splitters plain of movement. If another splitter is in that area, it too will be moved/resized.


Have Fun!!

Worm
02-17-2006, 10:40 AM
Here are the available splitter configs when using a Horizontal splitter across the page

Worm
02-17-2006, 10:41 AM
Here are the available splitter configs when using a Vertical splitter across the page

rhosk
02-17-2006, 12:44 PM
Whoa, this definitely opens all kinds of new doors :yes

Brett
02-17-2006, 01:13 PM
OK, Worm. You are officially more knowledgeable about AMS60 than I am! Good job!

Worm
02-17-2006, 01:14 PM
Thanks... but you're very modest.

Lorne
02-17-2006, 02:35 PM
That makes two of us! My hats off to you, Worm. :)

TJ_Tigger
02-17-2006, 02:58 PM
Great work Worm.
:yes :yes :yes :yes :yes :yes :yes :yes :yes :yes

Corey
02-17-2006, 03:28 PM
Amazening. :yes :yes :yes :yes :yes :yes :yes :yes :yes :yes

Intrigued
02-17-2006, 07:22 PM
You dun Spliter-r-dun Worm'inator.

:yes

Eagle
02-17-2006, 08:41 PM
Great Idea, Fantastic Result Worm

you da man :yes :yes :yes :cool

Worm
02-17-2006, 09:01 PM
I really wanted to make it so you could throw an app together with splitters very quickly. Being able to throw a control on the page and have it automatically taken care of was the goal. I think its as close as I can get it. Its kinda cool that you don't have to write any code at all, simply name the objects accordingly, and you're off.

Intrigued
02-17-2006, 09:02 PM
OH! And for what it is worth... Worm must get one of them two (2) hour lunch breaks that I have heard about.

@Worm
;)

Worm
02-17-2006, 09:11 PM
Hee, this things been cooking for a couple weeks now. Took a while to bring it to a boil.

Intrigued
02-17-2006, 09:14 PM
Worm, I fired it up and it looks great, no doubt. How about performance issues, run into any yet?

Worm
02-17-2006, 09:21 PM
Its hard to say. For me no... but I'm into creative coding :)

Eagle
02-17-2006, 10:09 PM
Performance: just the redraw 'flicker' while resizing takes place

hey.. could save existing 'bar' settings to reg on a page 'on close',
on app runtime load the saved bar settings on page preload ?

yosik
02-18-2006, 01:02 PM
Wow Wow and Triple Wow!!!!
It is AMAZING!! Truely AMAZING!!
Not that I am amazed that Worm could come up with this (You don't surprise us, Worm, you know..not anymore), but that he thought about it and that AMS has the inbred capability to do that.
Now, us mortals just have to think about the right usage for this.

Thanks!

Yossi

azmanar
02-18-2006, 03:15 PM
Hi,

Worm is super-creative, helpful and generous.

Unfortunately my slow brains can't figure out what I can do with Splitter Framework.

Does this mean, I'm splitting AMS pages like I split HTML pages with FRAMES? Like sourcing different codes for each frame? Like 2 FRAMES retain uniformity of content & obejcts, while 1 main frame is dynamic?

Does this also mean, I can set those FRAMES with its own objects and retain them throughout the project in many pages as though I'm inheriting them?

Does this mean, I can also set some pages with frames and some not?

bule
02-18-2006, 05:32 PM
Well not actually...

Eagle
02-23-2006, 05:41 PM
..and of course, other forum heroes..TJ and 'the Derm'
(for helping da Worm put this piece of AMS brilliance-functionality together)

salute to you guys once again ...

TJS
02-23-2006, 06:11 PM
..and of course, other forum heroes..TJ and 'the Derm'
(for helping da Worm put this piece of AMS brilliance-functionality together)

salute to you guys once again ...

I'm sure it goes without saying, but Eagle means TJ Tigger... I'm currenly a lowly "forum ranger" but am hoping to achieve my "forum runemaster" rank soon!

Corey
02-23-2006, 06:27 PM
A magic wand and one two three.
Title shall ye be! [swoosh]

:yes

TJS
02-23-2006, 07:40 PM
Whee!!! Now I can finally where these shiney fire gauntlets (+5 scripting)!!!

Corey
02-23-2006, 07:41 PM
Hee. :D :yes

Worm
02-23-2006, 09:22 PM
He's gotta be good people, he's from Michigan too!!

rctshine
03-16-2006, 11:53 PM
Yes what exactly is a splitter used for?

Intrigued
05-25-2007, 09:39 PM
I know this is an older thread, but to answer, if I may... the splitter is good for showing more content on the AMS Project's Page (work surface), without the need of more pages or resizing the Page itself.

One explanation that I hope sums it up as Worm might say.

RizlaUK
06-24-2007, 03:42 PM
in all my time in this forum, how on earth did i miss this example


i once tried to make a similar thing .... but failed, nice work worm :yes

rida
01-13-2009, 08:02 AM
I Need Original Splitter . vsplit_1" And "vsplit_2 And Thanxxxx

S0mbre
01-14-2009, 12:46 AM
Thank you Worm! That's incredible :)

S0mbre
01-15-2009, 12:28 AM
Funny thing happened to me... When I use Worm's example, it runs like clockwork, no problems. But when I tried to deploy the Splitter Framework in a new AMS application, it caused an error.

The error is that AMS (I've got AMS 7.5) doesn't want to recognize the tbObjectType object table, so that the first call to local Object = tbObjectType[Page.GetObjectType(sObject)] returns nil.

My example is attached.

How can that be fixed? Ok, I understand I could replace the handy object reference table by an unwieldy tree of if's and elseif's like:


if Page.GetObjectType(sObject) == OBJECT_BUTTON then
--- action 1
elseif Page.GetObjectType(sObject) == OBJECT_LABEL then
--- action 1
--- etc etc etc etc.......
end


...but that would swell the code and my brain. Any other variants??

Worm, many thanks again for this creative add-on to AMS!

S0mbre
01-15-2009, 12:47 AM
OK, got it! I just needed to add all the rest of AMS objects to the reference table! Now it should be full:


tbObjectType = {}
tbObjectType[OBJECT_BUTTON] = Button;
tbObjectType[OBJECT_LABEL] = Label;
tbObjectType[OBJECT_PARAGRAPH] = Paragraph;
tbObjectType[OBJECT_IMAGE] = Image;
tbObjectType[OBJECT_FLASH] = Flash;
tbObjectType[OBJECT_VIDEO] = Video;
tbObjectType[OBJECT_WEB] = Web;
tbObjectType[OBJECT_INPUT] = Input;
tbObjectType[OBJECT_HOTSPOT] = Hotspot;
tbObjectType[OBJECT_LISTBOX] = ListBox;
tbObjectType[OBJECT_COMBOBOX] = ComboBox;
tbObjectType[OBJECT_PROGRESS] = Progress;
tbObjectType[OBJECT_TREE] = Tree;
tbObjectType[OBJECT_RADIOBUTTON] = RadioButton;
tbObjectType[OBJECT_RICHTEXT] = RichText;
tbObjectType[OBJECT_CHECKBOX] = CheckBox;
tbObjectType[OBJECT_SLIDESHOW] = SlideShow;
tbObjectType[OBJECT_GRID] = Grid;
tbObjectType[OBJECT_PLUGIN] = Plugin;

:)

Worm
01-15-2009, 07:09 AM
Add the new objects to the table and you should be set

--[[************************************************** ******]]--
--[[ Set up a table to reference the objects in AMS ]]--
--[[************************************************** ******]]--
tbObjectType = {}
tbObjectType[OBJECT_BUTTON] = Button;
tbObjectType[OBJECT_LABEL] = Label;
tbObjectType[OBJECT_PARAGRAPH] = Paragraph;
tbObjectType[OBJECT_IMAGE] = Image;
tbObjectType[OBJECT_FLASH] = Flash;
tbObjectType[OBJECT_VIDEO] = Video;
tbObjectType[OBJECT_WEB] = Web;
tbObjectType[OBJECT_INPUT] = Input;
tbObjectType[OBJECT_HOTSPOT] = Hotspot;
tbObjectType[OBJECT_LISTBOX] = ListBox;
tbObjectType[OBJECT_COMBOBOX] = ComboBox;
tbObjectType[OBJECT_PROGRESS] = Progress;
tbObjectType[OBJECT_TREE] = Tree;
tbObjectType[OBJECT_RADIOBUTTON] = RadioButton
tbObjectType[OBJECT_RICHTEXT] = RichText;
tbObjectType[OBJECT_CHECKBOX] = CheckBox;
tbObjectType[OBJECT_SLIDESHOW] = SlideShow;
tbObjectType[OBJECT_GRID] = Grid;
tbObjectType[OBJECT_PLUGIN] = Plugin;


Wow, need to open my eyes this morning... guess you already figured that out :)

S0mbre
01-16-2009, 03:27 AM
Yeah, sorry about that! I always try to get help from others before racking my brain ;)
BTW is there a way to prevent Splitter FWK from resizing objects when firing "Page.OnSize"? I mean, sometimes the user wouldn't want to resize some buttons (such as "Close" or "Minimize"), but move them instead. I tried to comment out the resizing code in the globals, but the page looked ugly after that, so I just had to reset it back. Maybe it would be an option to pass another argument to the DoSplitter_OnSize(e_WindowWidth, e_WindowHeight, e_PageWidth, e_PageHeight, e_Type) function, say, a table containing the names of objects not to be resized on page resize.

Worm
01-16-2009, 07:12 AM
The framework has a built in feature that allows you to *not* move objects by naming them with nomove_ as the first 7 characters (Globals, line 217 or so). You could do something along that line too for like a move only/ no resize object.

In the Example project, the Click Here button uses this feature.

Centauri Soldier
01-17-2009, 08:59 PM
Wow! It's been said already but I must agree...this is amazing! Thanks Brad.
I guess now I have to rethink the layout all of my projects :D.

Worm
01-17-2009, 09:45 PM
Its kinda cool, especially since its pure AMS.

I always want to go back and incorporate all of the frameworks (Splitter and Slider) with the XP ExplorerBar (http://www.indigorose.com/forums/showthread.php?t=11889) example to have a one stop shop... but alas, I've not gotten around to it (yet, anyway)