Splitter

Splitter

Postby Silvio.Falconi » Mon Sep 30, 2013 9: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Splitter

Postby MaxP » Mon Sep 30, 2013 10:01 am

you mean this?

Code: Select all  Expand view

   oSplt:SetPosition( nPos )
 
User avatar
MaxP
 
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm

Re: Splitter

Postby Silvio.Falconi » Mon Sep 30, 2013 1: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Splitter

Postby MaxP » Mon Sep 30, 2013 3:44 pm

You can try this example
just change the coordinates

Code: Select all  Expand view

// 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
User avatar
MaxP
 
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm

Re: Splitter

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Splitter

Postby MaxP » Wed Oct 02, 2013 5:31 am

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

Massimo
User avatar
MaxP
 
Posts: 85
Joined: Thu Jul 12, 2007 2:02 pm

Re: Splitter

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 98 guests