Tutorial explanation object lib for creating a multiplatform splitter?

Kevin nnoydb at excite.com
Mon May 10 17:48:41 EDT 2004



This object is in the Object Library? 

-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
them
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)



 --- On Mon 05/10, Jan Schenkel < janschenkel at yahoo.com > wrote:
From: Jan Schenkel [mailto: janschenkel at yahoo.com]
To: use-revolution at lists.runrev.com
Date: Mon, 10 May 2004 14:30:04 -0700 (PDT)
Subject: Re: Tutorial explanation object lib  for creating a multiplatform splitter?

--- Kevin <nnoydb at excite.com> wrote:<br>> <br>> <br>> My definition follows a more "windows" slighted<br>> definition.  When one uses the file explorer the<br>> right border of the folder listed tree control is a<br>> splitter it splits and allows resizeing of the<br>> folder listing.<br>> <br>> K<br>> <br><br>Hi Kevin,<br><br>It looks like we're actually talking about the same<br>thing -- the only difference being the example I gave<br>was horizontal, and yours is vertical.<br>So when you look at the code in the horizontal<br>splitter, all you need to take into account is that<br>it's in the other direction.<br>In its most basic form, here's the code for a vertical<br>splitter button between two fields.<br><br>--<br><br>local sTrackingFlag, sMinLeft, sMaxRight<br><br>on mouseDown<br>  -- flip the tracking switch<br>  put true into sTrackingFlag<br>  -- and save the boundaries<br>  put the width of me DIV 2 into tMargin<br>  put the left of field "LeftField" + 16 + tMargin \<br>      into sMinLeft<br>  put the right of field "RightField" - 16 - tMargin \<br>      into sMaxRight<br>  -- and calculate my margin<br>end mouseDown<br><br>on mouseMove x,y<br>  if sTrackingFlag is true then<br>    -- first move this button within boundaries<br>    put min(sMaxRight,max(sMinLeft,x)) into tX<br>    put the location of me into tLocation<br>    put tX into item 1 of tLocation<br>    set the location of me to tLocation<br>    -- then update the field on the left hand side<br>    put the rect of field "LeftField" into tRect<br>    put the left of me into item 3 of tRect<br>    set the rect of field "LeftField" to tRect<br>    -- then update the field on the right hand side<br>    put the rect of field "RightField" into tRect<br>    put the right of me into item 1 of tRect<br>    set the rect of field "RightField" to tRect<br>  end if<br>end mouseMove<br><br>on mouseUp<br>  put false into sTrackingFlag<br>end mouseUp<br><br>on mouseRelease<br>  put false into sTrackingFlag<br>end mouseRelease<br><br>--<br><br>Hope this helped,<br><br>Jan Schenkel.<br><br>=====<br>"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)<br><br><br>	<br>		<br>__________________________________<br>Do you Yahoo!?<br>Win a $20,000 Career Makeover at Yahoo! HotJobs  <br>http://hotjobs.sweepstakes.yahoo.com/careermakeover <br>_______________________________________________<br>use-revolution mailing list<br>use-revolution at lists.runrev.com<br>http://lists.runrev.com/mailman/listinfo/use-revolution<br>

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


More information about the use-livecode mailing list