Results 1 to 3 of 3

Thread: Position der Trennlinie des Spittercontainers merken

  1. #1
    Join Date
    Feb 2009
    Location
    Germany, Mannheim
    Posts
    393

    Default Position der Trennlinie des Spittercontainers merken

    Hallo allerseits,

    heute habe ich gleich zwei Fragen.
    Ich würde gerne die letzte Position des Splittercontainers in der Registrierung speichern. D.h. wird die Trennlinie mit der Maus verschoben, soll der neue Wert gespeichert und beim nächsten Aufruf benutzt werden.

    Ich habe jetzt schon an allen möglichen Stellen mit dem Debugger Breakpoints angelegt und versucht die vermeintlichen Methoden in eine eigene Klasse zu packn und zu erweitern, aber ich finde scheinbar nicht die richtige.

    Hat jemand eine Idee, welche Klasse ich wie verändern müsste?

    Danke
    Roman
    Regards / Viele Grüße

    Roman Köhler
    Gartenstadt-Genossenschaft Mannheim eG

  2. #2
    Join Date
    Feb 2009
    Location
    Pine Island, Forida
    Posts
    2,056

    Default Re: Position der Trennlinie des Spittercontainers merken

    Ich habe momentar nicht viel zeit aber hier is was wir benuetzen,
    Code:
    //***************************************************************************
    //*
    //* Class:        cCovedbSplitterContainer
    //* Package Name: cCovedbSplitterContainer.pkg
    //*
    //***************************************************************************
    Use Windows.pkg
    Use cdbSplitterContainer.pkg
    Use CoveTextEdit.pkg
    Property String psLineDetailForumla
    Register_Object oTextDataDetail
    Class cCoveLineDetailtextEdit is a CoveTextEdit
      Procedure Construct_Object
        Forward Send Construct_Object
        Property String psCode
        Property String psLineDetailFormula
        Set peAnchors to anAll
        Set Read_Only_State to True
        On_Key Key_F3 Send EditTextData
      End_Procedure
      Procedure CoveClear
        Set Value to ""
      End_Procedure
      Procedure CoveRefresh
        String sHold
        Get psLineDetailFormula to sHold
        If (sHold < bang) Begin
          Send locate_textdata_record_for_userid "SCR" (psCode(Self)) "LINEDETL" ""
          Set psLineDetailFormula to (Trim(TextData.Text))
          Trim textdata.text to sHold
        End
        [sysop] If (sHold < bang) Move ("Formula in Textdata:SCR:" - (psCode(Self)) - ":LINEDETL -F3") to sHold
        If "(" IN sHold Move (Eval(sHold)) to sHold
        Set Value to sHold
      End_Procedure
      
      Procedure EditTextData
        Send locate_textdata_record_for_userid_no_Clear "SCR"(psCode(Self)) "LINEDETL" ""
        If (TextData.Recnum = 0) Begin
          FVTIMESTAMP Textdata
          FVSAVERECORD Textdata // create
        End  
        fvpopup oTextdataDetail Textdata.recnum
        Send locate_textdata_record "SCR" (psCode(Self)) "LINEDETL"         
        Set psLineDetailFormula to (Trim(TextData.Text))
      End_Procedure                   
    End_Class
    
    Class cCovedbSplitterContainer is a cdbSplitterContainer
      // Construct_Object: Object constructor.
      Procedure Construct_object
        Integer iSize
        Forward Send Construct_Object
        Property Boolean pbRememberSplitterLocation True
        Property String  psLineDetailFormula   
        Set piSplitterColor to clDkGray    
        Set pbSplitVertical to False
        Set peFixedPanel    to fpFixLastPanel
      End_Procedure
     
     // Procedure Add_focus Handle hoParent Returns Integer
      Procedure SizeSplitter
        Integer iRetval
        Integer iSize
        String sHold
        [debug] Showln "Restoring Splitter Position"
        If (pbRememberSplitterLocation(Self)) Begin
          Get StringField (name(Self)) "." 3 to sHold
          Append sHold "\" (Object_Label(Self))  
          Clear TranData
          Move "SPLITPOS"          to TranData.Codeset
          Move sHold               to TranData.Code1
          Move "SplitterLocation"  to TranData.Code2
          Move gsOperator          to TranData.Code3
          Find EQ TranData by Index.1
          [Found] Begin
            Set piSplitterLocation to TranData.Description
            Send Paint
            //Set piSplitterLocation to 80
            [debug] Showln "Splitter: " (piSplitterLocation(Self)) 
          End
        End
      End_Procedure
    
      //
      // Modified to store splitter location and redraw browses.
      //
      Procedure MoveSplitter Integer iGuiTrack
        Integer cxy
        Integer iFirstSize
        Handle hoFirstPanel
        Boolean bVertical
        String sHold
        
        Get pbSplitVertical to bVertical
        
        Get phoFirstPanel to hoFirstPanel
        Get GuiSize of hoFirstPanel to cxy
        If bVertical Begin
            Move (Low(cxy) + iGuiTrack) to iFirstSize
        End
        Else Begin
            Move (Hi(cxy) + iGuiTrack) to iFirstSize
        End
        
        Set piGuiSplitterLocation to iFirstSize
        If (pbRememberSplitterLocation(Self)) Begin
          Get piSplitterLocation to iFirstSize
          Get StringField (name(Self)) "." 3 to sHold
          Append sHold "\" (Object_Label(Self))  
          Clear TranData
          Move "SPLITPOS"          to TranData.Codeset
          Move sHold               to TranData.Code1
          Move "SplitterLocation"  to TranData.Code2
          Move gsOperator          to TranData.Code3      
          Find EQ TranData by Index.1
          If [Found] Reread Trandata
          Else Lock
            Move iFirstSize          to TranData.Description     
            If (TranData.Doc_no = 0) FV_PAR_COUNTER "#TRANDAT" Trandata.doc_no
            FVSAVERECORD Trandata
          Unlock  
          [debug] Showln "Saved splitter loc: " iFirstSize
        End  
        //
        // Force any browses to redraw
        //
        Broadcast Recursive Send OnResize
        Broadcast Recursive Send DoResize
      End_Procedure
     
    End_Class // CoveButton
    Frank Valcarcel
    Cove Systems, Inc.
    Pine Island, Florida USA
    fv@covesys.com
    (239) 823-7976

  3. #3
    Join Date
    Feb 2009
    Location
    Germany, Mannheim
    Posts
    393

    Default Re: Position der Trennlinie des Spittercontainers merken

    Hallo Frank,

    als erstes einmal vielen Dank für Deine schnelle und sehr umfangeiche Hilfe.
    Als zweites: Ich habe jetzt 3 Wochen Urlaub und kann die Vorschläge auch erst in 3 Wochen ausprobieren.
    Ich gebe dann Bescheid.

    Danke
    Regards / Viele Grüße

    Roman Köhler
    Gartenstadt-Genossenschaft Mannheim eG

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •