English
Forum

first/latest Position in Medit

 

Timotheus
Hi,

i'm new here, and I a problem.

I have a MultieditBox by Control with one waagerechten Scroll bar created.
then have I me whom others self dran gebastelt, and on the would like I then react.
now must I but know whether the Cursor in the Medit at the beginning, end or integrally where differently standing, because I Yes whom Scroll bar larger or small make must, if someone The Remove Button on the last position pressing, or on the first The Rückgängig Button.

How war I the out?

Timo
 
08/27/04  
 




Michael
Dell
Hi,

the MultiEdit created whom desired Scroll bar self,
though first if it needed becomes!

You need means none extra.

Demo:
declare med01&
cls
med01& = @Create("MultiEdit",%HWnd,"",20,20,600,400)
SetFocus(med01&)
SendKey(med01&,35)
Sleep 1000

WhileLoop 0,30,1

    SendString(med01&,"Test1 Test1 Test1 Test1 Test1 Test1 Test1 Test1 Test1 Test1 Test1 Test1 ")
    SendString(med01&,"Test2 Test2 Test2 Test2 Test2 Test2 Test2 Test2 Test2 Test2 Test2 Test2{ENTER}")

EndWhile

SendString(med01&,"{ENTER}Test- exits!!!!{ENTER}")

WhileNot Equ(%Key,2) Or Equ(%Key,27)

    WaitInput

EndWhile

End
Greeting

Michael
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
08/28/04  
 




Timotheus
Hello Michael,

with the MultiEdit GEHTS Yes not, because i want whom rechten Scroll bar yourself produce, so I on it react can, and the goes faith I only with Control. and the ScrollB must the itself indeed integrally normal behaviour can, and therefore must I everything what windows otherwise power, yourself make !

and How I get with the the first and last position out?

Timo
 
08/28/04  
 




Michael
Dell
Hello Timotheus,

You can also by SendMessage The Cursor- position detect and there's too Messages for Scroll bar.

Cursorpos in the MultiEdit: (Author: Uwe „Pascal“ Niemeier [...] )
**********************************
window 50,50-500,300
declare Edit%,row%,characters%,Gesamt&
let Edit%=createmultiedit(%hwnd,"",50,50,200,200)

while 1

    getmessage
    sendmessage(Edit%,176,addr(Gesamt&),0)
    locate 1,1
    let characters%=sub(Gesamt&,sendmessage(Edit%,187,-1,0))
    let row%=sendmessage(Edit%,201,-1,0)
    locate 1,1
    print "Der Cursor is behind Zeichen",characters%,"in Zeile",row%,"   "

endwhile

**********************************
here one Thread the you too yet help can: [...] 

Greeting

Michael
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
08/28/04  
 




Timotheus
thanks,

this is very the I meant!

but could you too yet these Scroll bar Messages write. because then bräuchte so did i not everything self make, and could simply whom rechten Scroll bar inquire.

Timo
 
08/29/04  
 




Michael
Dell
there give already one nice example from Andreas Miethes - Control.hlp:
Scroll- Beipiel from Control.hlp
Author: Andreas Miethe
HP:    http://www.ampsoft.de (Control.exe)
Scroll- Messages
NAME                  WERT     PARAMETER
SBM_SETPOS            $00E0    n3 = position , n4 = Repaint Yes(1) or No(0)
SBM_GETPOS            $00E1    n3=0,  n4=0
SBM_SETRANGE          $00E2    n3=minimum , n4=maximum
SBM_SETRANGEREDRAW    $00E6
SBM_GETRANGE          $00E3    n3=minimum , n4=maximum
SBM_ENABLE_ARROWS     $00E4
SBM_SETSCROLLINFO     $00E9
SBM_GETSCROLLINFO     $00EA
Declare end%,ScrollHorz%,Scrollvert%,Button%
Declare ScrollHX%,ScrollHY%,ScrollWX%,ScrollWY%
Declare ButtonrangeX%,ButtonrangeY%
Declare Buttonx%,Buttony%,Buttonh%,Buttonw%
settruecolor 1
cls rgb(192,192,192)
Let Buttonx% = 10                          left supra
Let Buttony% = 60                          right supra
Let Buttonh% = 24                          Hoehe
Let Buttonw% = 80                          wide
Let ButtonrangeX% = sub(width(%hwnd),130)  To hierhin must itself the Button in X moving
Let ButtonrangeY% = sub(height(%hwnd),30)  To hierhin must itself the Button in Y moving
Let ScrollHX% = 0                          left Scrollable Horizontal
Let ScrollHY% = sub(Width(%hwnd),20)       wide Scrollable Horizontal
Let ScrollWX% = sub(Width(%hwnd),20)       supra Scrollable Vertikal
Let ScrollWY% = sub(Height(%hwnd),20)      Hoehe Scrollable Vertikal
Let ScrollHorz% = @Control("Scrollbar","",$50000000,0,0,ScrollWX%,20,%hwnd,1000,%Hinstance)
Let ScrollVert% = @Control("Scrollbar","",$50000001,ScrollHY%,20,20,ScrollWY%,%hwnd,1001,%Hinstance)
Let Button% = @Control("Button","Ende",$50008000,Buttonx%,Buttony%,Buttonw%,Buttonh%,%hwnd,1002,%Hinstance)
Sendmessage(ScrollHorz%,$00E2,ButtonX%,ButtonrangeX%)  Scrollweite for Scrollable horizontal
Sendmessage(ScrollVert%,$00E2,ButtonY%,ButtonrangeY%)  Scrollweite for Scrollable Mouse and Sprite
Let end%=0

whilenot end%

    Waitinput

    if getfocus(Button%)

        Let end%=1

    Endif

    Buttonposition adjust
    setwindowpos Button% = Sendmessage(ScrollHorz%,$00E1,0,0),Sendmessage(Scrollvert%,$00E1,0,0)-80,24;0

wend

End
© Andreas Miethe , Bielefeld , 1998
here becomes one Button through Scroll bar moved!

where You The Control.hlp find standing in the example as well as The desired Messages.

P.s.: If you time again Beipiele suchts a crazy sortierte Related Links find You here: [...] 

Sodele. hope the helps!

lovely sunday you all...

Michael
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
08/29/04  
 




Timotheus
this is not integrally the I Search. really white I now already everything.
but there a Possibility whom rechten Scroll bar in a MultiEdit(or Control) abzufragen? then bräuchte I do not always everything abzufragen and To positionieren if in the MultiEdit something association becomes

Timo
 
08/29/04  
 




Michael
Dell
I

and nochn example:
Author: Michael Dell
ScrollBar mins, Max and Pos  Info
Def gScrollPos(2)   !"user32.dll","GetScrollPos"
Def gScrollRange(4) !"user32.dll","GetScrollRange"
Declare med01&,scrMin&,scrMax&
actually position the Scroll bar
gScrollPos(hndl&,0)             SB_HORZ = 0
gScrollPos(hndl&,1)             SB_VERT = 1

Proc gScrollMinMax

    mins and Max the Scrollable ermittel
    Parameters hndl&,HorVer%          HorVer%=0 -> Horizontal / HorVer%=1 -> Vertikal
    gScrollRange(hndl&,HorVer%,Addr(scrMin&),Addr(scrMax&))

ENDPROC

Proc ZeigeScrollMinMaxPos

    Parameters HorVer%
    gScrollMinMax(med01&,HorVer%)

    If HorVer%

        MessageBox(Add$(Add$(Add$("Min=",Str $(scrMin&)),Add$("  Max=",Str $(scrMax&))),Add$("  Pos=",Str $(gScrollPos(med01&,HorVer%)))),"Vertikal (mins Max Pos):",0)

    Else

        MessageBox(Add$(Add$(Add$("Min=",Str $(scrMin&)),Add$("  Max=",Str $(scrMax&))),Add$("  Pos=",Str $(gScrollPos(med01&,HorVer%)))),"Horizontal (mins Max Pos):",0)

    EndIf

    SetFocus(med01&)

ENDPROC

cls
med01& = @Create("MultiEdit",%HWnd,"",20,20,600,400)
SetFocus(med01&)
SendKey(med01&,35)

WhileLoop 0,30,1

    SendString(med01&,"Test1 Test1 Test1 Test1 Test1 Test1 Test1 Test1 Test1 Test1 Test1 Test1 ")
    SendString(med01&,"Test2 Test2 Test2 Test2 Test2 Test2 Test2 Test2 Test2 Test2 Test2 Test2{ENTER}")

EndWhile

SendString(med01&,"{ENTER}Test- exits!!!!{ENTER}")
ZeigeScrollMinMaxPos 0
ZeigeScrollMinMaxPos 1

WhileNot Equ(%Key,2) Or Equ(%Key,27)

    WaitInput
    ZeigeScrollMinMaxPos 0
    ZeigeScrollMinMaxPos 1

EndWhile

End
Sodele, the wärs... :-P

Michael
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
08/29/04  
 




Timotheus
I have another new question, what about me think the tappt im dunkeln here mere to the letztn ask past:

How wars I The Zeilennummer the obersten row The in a MultiEdit To see is out?

Timo
 
09/26/04  
 



Hello Timotheus...

so Perhaps?
Windowstyle 31
Windowtitle "Erste visible row in the Multiedit"
Window 0,0-640,440
Declare EDIT&,Button&,Zeile&
LET EDIT&=@createmultiedit(%HWND,"",10,10,300,300)
LET BUTTON&=@CREATEBUTTON(%HWND,"Erste visible row?",10,330,300,30)
ADDFONTS
@Movelisttoedit(EDIT&)

While 0=0

    Waitinput

    IF @GETFOCUS(Button&)

        LET ZEILE&=@SENDMESSAGE(EDIT&,$00CE,0,0) index the row inquire
        @MESSAGEBOX(@ADD$("Erste visible row: ",@STR$(@int(ZEILE&+1))),"Ergebnis",64)

    ENDIF

wend

 
09/26/04  
 




Michael
Dell
Hi people,

ausgehend of my last example, (Maximale Zeilenzahl + 1) - ScrollbalkenPos.
there the Scroll bar too in its Size the Anzeigbaren area in relation to that
whole Content corresponds to.

Greeting Michael...
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
09/26/04  
 




Timotheus
thanks :biggrin:
 
09/26/04  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.147 Views

Untitledvor 0 min.
Ernst04/22/16
RudiB.04/03/16
Untitled05/26/12
Untitled05/21/12
More...

Themeninformationen



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