FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Splitter
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Splitter
Posted: Mon Sep 30, 2013 09:09 AM

Can I set the ccordinates of the splitter until the final user can move ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 99
Joined: Thu Jul 12, 2007 02:02 PM
Re: Splitter
Posted: Mon Sep 30, 2013 10:01 AM
you mean this?

Code (fw): Select all Collapse
   oSplt:SetPosition( nPos )
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Splitter
Posted: Mon Sep 30, 2013 01:27 PM

I think it fix the position Instead I wish the final user can move the splitter to the right where he wants but when it move on the left he can move the splitter at x pos

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 99
Joined: Thu Jul 12, 2007 02:02 PM
Re: Splitter
Posted: Mon Sep 30, 2013 03:44 PM
You can try this example
just change the coordinates

Code (fw): Select all Collapse
// Testing FiveWin splitter controls

#include "FiveWin.ch"
#include "Splitter.ch"



//----------------------------------------------------------------------------//

function Main()

   local cTitle := "Testing the Splitter controls"
   local cText, oSplit, oWnd, oLbx, oGet

   DEFINE WINDOW oWnd FROM 1, 1 TO 400, 600 PIXEL ;
      TITLE cTitle ;
      BORDER NONE

   SELECT 1
   USE EJEMPLO1.DBF

   @ 20,20 LISTBOX oLbx FIELDS SIZE 200,300 PIXEL OF oWnd ;
      ON CHANGE cText := Ejemplo1->Sintax

   @ 20,225 GET oGet VAR cText TEXT SIZE 300,300 PIXEL OF oWnd

   oLbx:bChange:={|| oGet:Refresh() }

   @ 20, 220  SPLITTER oSplit ;
              VERTICAL ;
              PREVIOUS CONTROLS oLbx ;
              HINDS CONTROLS oGet ;
              LEFT MARGIN 100 ;
              RIGHT MARGIN 140 ;
              SIZE 4, 300  PIXEL ;
              OF oWnd ;
              _3DLOOK ;
              UPDATE 
              
           oSplit:bChange := { | oSplit | MyChange( oSplit ) }

  ACTIVATE WINDOW oWnd

return nil

STATIC FUNCTION MyChange( oSplit )
        LOCAL   nFirst := oSplit:nFirst, aMyPos := { 200, 300, 400 }, nPos

        IF nFirst <= aMyPos[1]
                nFirst := aMyPos[1]
        ELSE
                IF nFirst >= ATAIL( aMyPos )
                        nFirst := ATAIL( aMyPos )
                ELSE
                        FOR nPos := 1 TO LEN( aMyPos ) - 1
                                IF nFirst > aMyPos[nPos] .AND. nFirst < aMyPos[nPos + 1]
                                        IF (aMyPos[nPos + 1] - nFirst) < (nFirst - aMyPos[nPos])
                                                nFirst := aMyPos[nPos + 1]
                                        ELSE
                                                nFirst := aMyPos[nPos]
                                        ENDIF        

                                        EXIT
                                ENDIF
                        NEXT nPos
                ENDIF
        ENDIF        

        oSplit:SetPosition( nFirst )
RETURN NIL


Saluti Massimo
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Splitter
Posted: Tue Oct 01, 2013 11:38 PM

what you do mean with this aMyPos := { 200, 300, 400 }
I tried on my app and while on left go run ok on right I can move to the end of the dialog

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 99
Joined: Thu Jul 12, 2007 02:02 PM
Re: Splitter
Posted: Wed Oct 02, 2013 05:31 AM

you must enter the coordinates of the columns in the array
where the user can position
(sorry for my english)

Massimo

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Splitter
Posted: Wed Oct 02, 2013 10:15 AM

can you wrote at private mail pls ( silvio_dot_falconi_AT_gmail_dot_COM) thanks

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion