| |
|
|
- Page 1 - |
|
RudiB. | Hello together,
have time again something... at scroll over the control VSroll stay very often The Lines not "im Raster". in a How I it otherwise squeeze out should.
Can the somehow fixen, the The Lines "im Raster bleiben" and not only The Half displayed becomes (supreme row !!) |
|
|
| |
|
|
|
« this Posting watts as Solution marked. » |
|
Georg Teles | good tommorrow,
be since one year out from the Programming. have order Style nothing suitable found, only Workarounds which The "Justierung the Zeile" as an afterthought distinguished ... as Denkanstoß here small example, umständlich, is vllt useful: (with Edit and Control first hineinklicken, then which VScroll activate because Focus/Child, can sodann with ProcAddr correct go)
Cls
var Text$ = GenTxt()
Declare pre_pos&
Proc GenTxt
Declare tx$
tx$ = ""
WhileLoop 0,200
tx$ = tx$+"Text_"+Str $(&loop)+"\n"
EndWhile
tx$ = tx$+"ENDE"
Return tx$
ENDPROC
locate 0,0
print "RichEdit"
locate 0,27
print "Edit (Control)"
locate 0,54
print "VScroll"
var red& = Create("richedit", %hWnd, Text$, 5, 25, 200, 200)
var red2& = Control("Edit", "", $50200044, 205, 25, 200, 200, %hWnd, 0, %hInstance)
var vsc& = Create("VScroll",%hWnd,"",422,25,20,200)
'ACHTUNG size the VScroll mind ! on the best to Lines less Visible Lines
'SetScrollRange vsc&,0,190
'$00BA 'em_GetLineCount - Visible Lines (here 11)
SetScrollRange vsc&,0,SendMessage(red&,$00BA,0,0)-11
SetText red&,Text$
SetText red2&,Text$
While 1=1
Waitinput
'if Focus on VScroll
If GetFocus(vsc&)
SendMessage(red&,$00B6,0,GetScrollPos(vsc&)-pre_pos&)
SendMessage(red2&,$00B6,0,GetScrollPos(vsc&)-pre_pos&)
pre_pos& = GetScrollPos(vsc&)
locate 3,57
print "GoTO Line "+Str $(pre_pos&)+Space$(3)
EndIf
'if Focus on RichEdit
If GetFocus(red&)
SendMessage(red&,$00B6,0,GetScrollPos(vsc&)-pre_pos&)
SendMessage(red2&,$00B6,0,SendMessage(red&,$00CE,0,0)-pre_pos&)
pre_pos& = SendMessage(red&,$00CE,0,0)
SetScrollPos vsc&, pre_pos&
locate 3,57
print "GoTO Line "+Str $(pre_pos&)+Space$(3)
EndIf
'if Focus on ControlEDIT
If GetFocus(red2&)
SendMessage(red2&,$00B6,0,GetScrollPos(vsc&)-pre_pos&)
SendMessage(red&,$00B6,0,SendMessage(red2&,$00CE,0,0)-pre_pos&)
pre_pos& = SendMessage(red2&,$00CE,0,0)
SetScrollPos vsc&, pre_pos&
locate 3,57
print "GoTO Line "+Str $(pre_pos&)+Space$(3)
EndIf
endwhile
Regards |
|
|
| |
|
|
|
|
RudiB. | another small Nachtrag... this is only one Richedit so, in the MultiEdit functions the scroll really Zeilenweise. I need the but in Richedit so... |
|
|
| |
|
|
|
Georg Teles | good tommorrow,
be since one year out from the Programming. have order Style nothing suitable found, only Workarounds which The "Justierung the Zeile" as an afterthought distinguished ... as Denkanstoß here small example, umständlich, is vllt useful: (with Edit and Control first hineinklicken, then which VScroll activate because Focus/Child, can sodann with ProcAddr correct go)
Cls
var Text$ = GenTxt()
Declare pre_pos&
Proc GenTxt
Declare tx$
tx$ = ""
WhileLoop 0,200
tx$ = tx$+"Text_"+Str $(&loop)+"\n"
EndWhile
tx$ = tx$+"ENDE"
Return tx$
ENDPROC
locate 0,0
print "RichEdit"
locate 0,27
print "Edit (Control)"
locate 0,54
print "VScroll"
var red& = Create("richedit", %hWnd, Text$, 5, 25, 200, 200)
var red2& = Control("Edit", "", $50200044, 205, 25, 200, 200, %hWnd, 0, %hInstance)
var vsc& = Create("VScroll",%hWnd,"",422,25,20,200)
'ACHTUNG size the VScroll mind ! on the best to Lines less Visible Lines
'SetScrollRange vsc&,0,190
'$00BA 'em_GetLineCount - Visible Lines (here 11)
SetScrollRange vsc&,0,SendMessage(red&,$00BA,0,0)-11
SetText red&,Text$
SetText red2&,Text$
While 1=1
Waitinput
'if Focus on VScroll
If GetFocus(vsc&)
SendMessage(red&,$00B6,0,GetScrollPos(vsc&)-pre_pos&)
SendMessage(red2&,$00B6,0,GetScrollPos(vsc&)-pre_pos&)
pre_pos& = GetScrollPos(vsc&)
locate 3,57
print "GoTO Line "+Str $(pre_pos&)+Space$(3)
EndIf
'if Focus on RichEdit
If GetFocus(red&)
SendMessage(red&,$00B6,0,GetScrollPos(vsc&)-pre_pos&)
SendMessage(red2&,$00B6,0,SendMessage(red&,$00CE,0,0)-pre_pos&)
pre_pos& = SendMessage(red&,$00CE,0,0)
SetScrollPos vsc&, pre_pos&
locate 3,57
print "GoTO Line "+Str $(pre_pos&)+Space$(3)
EndIf
'if Focus on ControlEDIT
If GetFocus(red2&)
SendMessage(red2&,$00B6,0,GetScrollPos(vsc&)-pre_pos&)
SendMessage(red&,$00B6,0,SendMessage(red2&,$00CE,0,0)-pre_pos&)
pre_pos& = SendMessage(red2&,$00CE,0,0)
SetScrollPos vsc&, pre_pos&
locate 3,57
print "GoTO Line "+Str $(pre_pos&)+Space$(3)
EndIf
endwhile
Regards |
|
|
| |
|
|
|
RudiB. | Hello Georg,
... danke, this is, faith I The Solution. Do I in silence try. but on the first look very the right, I sought have. I Try the today evening times for my drop from and give then Feedback.
Greeting Rudi |
|
|
| |
|
|
|
RudiB. | ...already ausprobiert.... TREFFER....
thanks Georg, the wars...
Greeting from munich Rudi |
|
|
| |
|
|
|
Georg Teles | good evening, well wonderful
Regards |
|
|
| |
|
|