English
Forum

Done: second GridBOX scroll

 

Thomas
Freier
I wanted to gladly a second GridBOX with the first scroll. Horizontal is OK. Vertikal I get simply not there and I here too no Notes (except MultiEdit etc.) found. knows of/ one a Solution?
CompileMarkSeparation
 $H WINDOWS.PH
 $H MESSAGES.PH
 $H COMMCTRL.PH
Declare Titel$,hGrid&,hGrid1&

Proc GridBox1

    Titel$ = "Links;0;180;Mitte;0;100;Rechts;0;80"
    hGrid&   = Create("GridBox", %hWnd, Titel$, 1, 30, 30, 200, 190)
    AddString(hGrid&, "AB|DEF|0123")
    AddString(hGrid&, "GHI|J23KL|012345")
    AddString(hGrid&, "FGRT|MNOP|PQR|")
    AddString(hGrid&, "STU||V")
    AddString(hGrid&, "ABCD12|STUVW|XYZ0")
    AddString(hGrid&, "ABCD34|stuvw|999,00")
    AddString(hGrid&, "Abcd45|STUVW|-111,11")
    AddString(hGrid&, "Abcd56|StUVW|2.111,11")
    AddString(hGrid&, "Abcd56|AbxVW|-15.234,56")
    AddString(hGrid&, "Abcd67|STUVW|0,00")

EndProc

Proc GridBox2

    Titel$ = "Links;0;180;Mitte;0;100;Rechts;0;80"
    hGrid1&   = Create("GridBox", %hWnd, Titel$, 1, 330, 30, 200, 190)
    AddString(hGrid1&, "AB|DEF|0123")
    AddString(hGrid1&, "GHI|J23KL|012345")
    AddString(hGrid1&, "FGRT|MNOP|PQR|")
    AddString(hGrid1&, "STU||V")
    AddString(hGrid1&, "ABCD12|STUVW|XYZ0")
    AddString(hGrid1&, "ABCD34|stuvw|999,00")
    AddString(hGrid1&, "Abcd45|STUVW|-111,11")
    AddString(hGrid1&, "Abcd56|StUVW|2.111,11")
    AddString(hGrid1&, "Abcd56|AbxVW|-15.234,56")
    AddString(hGrid1&, "Abcd67|STUVW|0,00")

EndProc

~SetScrollRange(hGrid&,0,0,1000,1)
~SetScrollRange(hGrid&,0,0,1000,0)
declare scroll&,ascroll&
declare scroll1&,ascroll1&

SubClassProc

    If SubClassMessage(hGrid&, ~WM_HSCROLL)

        locate 0,0
        print str$(~GetScrollPos(hGrid&,0))+"    "
        ascroll& = scroll&
        scroll& = ~GetScrollPos(hGrid&,0)
        ~SetScrollPos(hGrid1&,0,scroll&,1)
        sendmessage(hGrid1&,~LVM_SCROLL,scroll&-ascroll&,0)
        ~UpdateWindow(hGrid1&)
        Set("WinProc",1)

    ElseIf SubClassMessage(hGrid&, ~WM_VSCROLL)

        locate 0,30
        print str$(~GetScrollPos(hGrid&,1))+"    "
        ascroll1& = scroll1&
        scroll1& = ~GetScrollPos(hGrid&,1)
        ~SetScrollPos(hGrid1&,1,scroll1&,1)
        sendmessage(hGrid1&,~LVM_SCROLL,(scroll1&-ascroll1&),0)
        ~UpdateWindow(hGrid1&)
        Set("WinProc",1)

    EndIf

endproc

SetTrueColor 1
WindowStyle 538
WindowTitle "Scroll nur linke Gridbox"
Window 100,100-600,400
Cls ~GetSysColor(15)
UseFont "MS Sans Serif",13,0,0,0,0
SetDialogFont 1
GridBox1
GridBox2
Set("SubClassMode",1)
SubClass hGrid&,1

While 1

    WaitInput
    case %key=2: Break

Wend

../function-references/XProfan/subclass/'>SubClass hGrid&,0
 
Gruß Thomas
Windows XP SP2, XProfan X2
08/16/09  
 



If I your Sourcecode starte, then scrolls The rights GridBOX with the left with.

What exactly should because occur?
 
08/16/09  
 




Thomas
Freier
Yes, so was virtual, that the visible Content the rechten Box the the left gleicht, if The left gescrollt becomes. Z.Z. goes But only horizontal.
have me too again Franks List view undertaken, in the now a function include is, The The first angezeige Lines-Nr determined. will be it parallel above try.
 
Gruß Thomas
Windows XP SP2, XProfan X2
08/16/09  
 



functions with you these very Analog Solution?
CompileMarkSeparation
 {$i}
 $H WINDOWS.PH
 $H MESSAGES.PH
 $H COMMCTRL.PH
Declare Titel$,hGrid&,hGrid1&

Proc GridBox1

    Titel$ = "Links;0;180;Mitte;0;100;Rechts;0;80"
    hGrid&   = Create("GridBox", %hWnd, Titel$, 1, 30, 30, 200, 190)
    AddString(hGrid&, "AB|DEF|0123")
    AddString(hGrid&, "GHI|J23KL|012345")
    AddString(hGrid&, "FGRT|MNOP|PQR|")
    AddString(hGrid&, "STU||V")
    AddString(hGrid&, "ABCD12|STUVW|XYZ0")
    AddString(hGrid&, "ABCD34|stuvw|999,00")
    AddString(hGrid&, "Abcd45|STUVW|-111,11")
    AddString(hGrid&, "Abcd56|StUVW|2.111,11")

EndProc

Proc GridBox2

    Titel$ = "Links;0;180;Mitte;0;100;Rechts;0;80"
    hGrid1&   = Create("GridBox", %hWnd, Titel$, 1, 240, 30, 200, 190)
    AddString(hgrid1&, "AB|DEF|0123")
    AddString(hgrid1&, "GHI|J23KL|012345")
    AddString(hgrid1&, "FGRT|MNOP|PQR|")
    AddString(hgrid1&, "STU||V")
    AddString(hgrid1&, "ABCD12|STUVW|XYZ0")
    AddString(hgrid1&, "ABCD34|stuvw|999,00")
    AddString(hgrid1&, "Abcd45|STUVW|-111,11")
    AddString(hgrid1&, "Abcd56|StUVW|2.111,11")

EndProc

SubClassProc

    if subClassMessage(hGrid&,~wm_paint)

        sendMessage(hGrid1&,~lvm_scroll,~getScrollPos(hGrid&,0)-~getScrollPos(hGrid1&,0),(~getScrollPos(hGrid&,1)-~getScrollPos(hGrid1&,1))*hiword(sendMessage(hGrid1&,~lvm_getItemSpacing,1,0)))

    endif

endproc

SetTrueColor 1
WindowStyle 538
WindowTitle "Scroll nur linke Gridbox"
Window 100,100-600,400
Cls ~GetSysColor(15)
UseFont "MS Sans Serif",13,0,0,0,0
SetDialogFont 1
GridBox1
GridBox2
SubClass hGrid&,1

While 1

    WaitInput
    case %key=2: Break

Wend

SubClass hGrid&,0
 
08/16/09  
 




Thomas
Freier
JA!! thanks for elegant Solution, there generally validly.
Uff! for me must I now try from the Einzeiler for H&V whom H- and V-part To separieren, since the both lists horizontal each for itself and only Mouse and Sprite together gescrollt go should.
 
Gruß Thomas
Windows XP SP2, XProfan X2
08/17/09  
 



simply whom 3. Param of SendMessage on 0 settle, wParam with lvm_scroll is for X-axis there:
CompileMarkSeparation
sendMessage(hGrid1&,~lvm_scroll,0,(~getScrollPos(hGrid&,1)-~getScrollPos(hGrid1&,1))*hiword(sendMessage(hGrid1&,~lvm_getItemSpacing,1,0)))
>
 
08/17/09  
 




Thomas
Freier
A small example for XProfan 11.2 with the "Scrollaktionen". with the Scrolling the Bildes (months) überm List view be I not yet pleased. The pressure is z.Z. not optimiert. How always : Use on own risk.

543 kB
Hochgeladen:08/29/09
Downloadcounter34
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
08/29/09  
 



in the SubClassProc have "mein" wm_paint ausgetauscht, therefore but reacted the update always first (1 Frame/Message) To late. (it remaining only wm_paint)
 
08/29/09  
 




Thomas
Freier
Have Yes both as example in the code let. eachone Click in a the both Listviews resolve one wm_paint from. this is at edit irritating.
unfortunately scroll both lists with the Mausrad now only, if no list whom Focus has.
 
Gruß Thomas
Windows XP SP2, XProfan X2
08/30/09  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.805 Views

Untitledvor 0 min.
RudiB.04/11/22
Langer01/11/21
rquindt06/06/16
Ernst05/21/16
More...

Themeninformationen

this Topic has 2 subscriber:

Thomas Freier (5x)
iF (4x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie