Recent

Author Topic: Need help with ScrollWindowEx  (Read 8337 times)

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Need help with ScrollWindowEx
« Reply #30 on: February 27, 2023, 09:39:33 pm »
Martin,

I did the showmessages.
The first position (VrtBarPos) is 18116.
The highlighting was removed.
The second position (SetVrtPos) is 18376 ... lower in the document.
ScrollWindowEx did not throw an error.
UpdateWindow did not throw an error.
The window did not scroll.

I saw your post and used
windows.ScrollWindowEx(Handle, 0, (VrtBarPos - SetVrtPos), nil, nil, 0, nil, SW_INVALIDATE);
windows.ScrollWindowEx(PageMemo.Handle, 0, (VrtBarPos - SetVrtPos), nil, nil, 0, nil, SW_INVALIDATE);

Then I did
windows.ScrollWindowEx(Handle, 0, -80, nil, nil, 0, nil, SW_INVALIDATE);
windows.ScrollWindowEx(PageMemo.Handle, 0, -80, nil, nil, 0, nil, SW_INVALIDATE);

Then I repeated all of them again with LCLIntf.ScrollWindowEx.
Then again without the windows prefix nor the LCLIntf.

I guess something got fixed in the process, but I had never tested "nil" again.
All of these, however, have performed the same as my own was performing: no errors nor scrolling.

Are you using a Windows 11 operating system?

I think that Windows 11 just won't let programed scrolling happen.

I can RUN the code with my original:
SendMessage(PageMemo.handle, WM_VSCROLL, MakeLong(SB_THUMBPOSITION, VrtBarPos), 0); 

The RUN function makes the scrolling happen.

I can compile as an EXE, paste it to my operating folder, and it won't scroll.
I can make a new folder, launch it from there, and it will scroll.
But few days later it won't scroll either.

I think it is a Windows security action. Automated scrolling is considered a hack.

Rick
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12340
  • Debugger - SynEdit - and more
    • wiki
Re: Need help with ScrollWindowEx
« Reply #31 on: February 27, 2023, 10:25:58 pm »
I am using Win 10. I did just test on Win11 too, works exactly as expected (as I expect it, and as I read the msdn documentation).

Drop a button and a memo on a form, and add a button-click
Code: Pascal  [Select][+][-]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. begin
  3.   ScrollWindowEx(Memo1.Handle, 0, 10, nil, nil, 0, nil, SW_INVALIDATE);
  4. end;
  5.  

On both Win 10/11, this will "scroll" the memo's visible content. But as soon as the memo paints again (e.g. you click the memo, or press a key while it has focus) it will reset to where it was.
If unlucky such a paint event may happen within micro seconds after the "scroll".

I do quote "scroll" in the above, because it is not what you expect "scroll" to be.


When the memo paints, it outputs the text that it has to the screen. The text is output as pixel patterns. And those pixels are stored in the graphic memory as a bitmap.

The computer has a bitmap that contains each pixel visible on the screen/monitor. This bitmap does not belong to the memo, it represents the screen content.

ScrollWindowEx "scrolls" (or moves) the pixel in that screen bitmap. And only those. And nothing else.
Especially ScrollWindowEx
- does not tell the memo that it has done something or even was called
- does not even tell anything to the application owning the memo.

It only returns a result to your code, and if request invalidates some content, and sends a paint message. (Such invalidation can also happen by many other causes, so the memo can not tell anything from that).

Therefore for the memo the scroll has never happened, and when the memo paints again, it will paint the unscrolled content.
And if that is a full repaint / not just a partial paint, then any moved pixels are overpainted.
(After the scrollWindoEx it only does a partial paint, so some moved pixels remain on the screen)

And that is all there is.
I've tried to point that out before.




rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Need help with ScrollWindowEx
« Reply #32 on: February 28, 2023, 01:26:37 pm »
Martin

I have understood what you have been saying ... the screen is a tablet that gets painted. It isn't a scroll like you have with a rolled up document. Its a simulation.

However, this painting is what happens when I use my mouse wheel or click and drag the elevator cabin in the scroll bar. That is the scroll that I want and expect.

Have you been saying anything different from that? The actual mechanics of the simulation are buried in the operating system. Yet I expect the ScrollWindowEx function to make that available to me. Moreover, that is exactly what my SendMessage(PageMemo.handle, WM_VSCROLL, MakeLong(SB_THUMBPOSITION, VrtBarPos), 0) function had already been providing me with. I need to have its functionality returned to me.

I am going to try your Button1Click procedure. It looks the same as what I have already tested. But since you have proven that it works with Windows 10 & 11, and if it doesn't on my computer, then I will have to track down what is boogering everything on my side.

I will get back to you. I would also like to say that I appreciate all that you been doing for me.

Rick
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Need help with ScrollWindowEx
« Reply #33 on: February 28, 2023, 02:07:59 pm »
Martin

Code: Pascal  [Select][+][-]
  1. procedure TCmdForm.Button1Click(Sender: TObject);
  2. begin
  3.   ScrollWindowEx(PageMemo.Handle, 0, 100, nil, nil, 0, nil, SW_INVALIDATE);
  4.   UpdateWindow(PageMemo.Handle);
  5. end;
  6.  

I put this into my existing procedure, and it temporarily moved the scroll bar, but not the document (by all appearances).

So I made an independent button and procedure, and it painted with the prescribed offset. Likewise, when I moved my cursor back to the window, it triggered a MouseEnter function that repainted the screen with its old data ... offset gone!

However, I had included the UpdateWindow(PageMemo.Handle) function in my code, and it had done nothing at all.

So you are correct, a double paint had been messing things up. But the UpdateWindow function hasn't painted anything. If I can't get it to perform as expected, then I need to find another function that will.

Moreover, I think it might help if I managed the RECT areas that ScrollWindowEx wants me to assign.

Rick
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12340
  • Debugger - SynEdit - and more
    • wiki
Re: Need help with ScrollWindowEx
« Reply #34 on: February 28, 2023, 02:12:30 pm »
Martin

I have understood what you have been saying ... the screen is a tablet that gets painted. It isn't a scroll like you have with a rolled up document. Its a simulation.

However, this painting is what happens when I use my mouse wheel or click and drag the elevator cabin in the scroll bar. That is the scroll that I want and expect.

Not exactly the same....
Well, it is possible that the memo (upon receiving a scrollbar action) actually calls ScrollWindowEx (so that part is the same). But the Scrollbar action does more.

In my example (form, memo, button, buttonClick event) ScrollWindowEx scrolls the content (except for a small area at the top or bottom, depending on direction). But in that example that scroll is temporary. It gets undone by the next paint.

If the memo text is
Code: Text  [Select][+][-]
  1. line 1
  2. line 2
  3. line 3
  4. ...

And the memo gets a WM_paint event, then the memo does
- what is my internal value for the first line to show.
  -- That value will at some time before have been taken from the scrollbar.
  -- Or it will have been changed by the use of cursor keys (a memo can scroll, even without scrollbars)
- The memo will then paint all pixels according to that internal value.
   If the memo thinks "line 2" is first to be shown, it will show "line 2".

ScrollWindowEx is not informing the memo. So the internal value is not changed.
That is ok, if the memo itself did call ScrollWindowEx, because then the memo knows to update its internal value.

But if you call ScrollWindowEx, the memo does not know.
So if you call ScrollWindowEx, then "line 3" may be at the top. But the memo still believes it is "line 2", and in the next paint event it will undo the scroll.

Also (and you can see that with the example I described), ScrollWindowEx  does not fill the "scrolled in" area => the memo does in a paint event. But the memo fills it with what it thinks should be there (and that is the unscrolled content).

---
You can call ScrollWindowEx on a TButton. And it will work. And the image of the button (not the button, only the image of the button) will be moved on the screen.
Of course a button has no concept of being scrolled. You would not expect the button to know when it has been scrolled.


Quote
Have you been saying anything different from that? The actual mechanics of the simulation are buried in the operating system. Yet I expect the ScrollWindowEx function to make that available to me.
No, ScrollWindowEx is not the mechanics of the memo's scrolling. It is just a tool that the memo can use as part of its internal mechanics.
But it is just a small part. And if you execute it without the other parts then it will not to the full job.


Equally TextOutA https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-textouta may be part of what the memo uses (this or some equal function).

But if you do a TextOutA on the memos HDC (can be derived from the handle, IIRC), then that will not have a lasting effect. It will maybe draw something on the screen, but the next wm_paint will overpaint it. Because the memo never knew you put something there.

Quote
Moreover, that is exactly what my SendMessage(PageMemo.handle, WM_VSCROLL, MakeLong(SB_THUMBPOSITION, VrtBarPos), 0) function had already been providing me with. I need to have its functionality returned to me.
But that is a message that goes to the Memo. The memo will know that this happened (if it works). And so the memo will do all the parts of scrolling. Including updating its internal values.

Unfortunately I do not know why it does not always work. Or if it is meant to work that way.


Quote
I am going to try your Button1Click procedure. It looks the same as what I have already tested. But since you have proven that it works with Windows 10 & 11, and if it doesn't on my computer, then I will have to track down what is boogering everything on my side.

It works as in "It does temporarily scroll the image".
It does not do what you want it to do. It can not do what you want it to do. It is not meant to do that.

After this post
Please don't try to get me to do something else. If you don't know how to fill in the data, please just wait for someone who does.
I tried to show you "how to fill in the data".
Despite knowing that it wont help you. Despite that filling in the data correctly will simply not do what you want to be done.


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12340
  • Debugger - SynEdit - and more
    • wiki
Re: Need help with ScrollWindowEx
« Reply #35 on: February 28, 2023, 02:14:18 pm »
then I need to find another function that will.
Yes.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12340
  • Debugger - SynEdit - and more
    • wiki
Re: Need help with ScrollWindowEx
« Reply #36 on: February 28, 2023, 02:34:03 pm »
Ok no idea if that has any influence.... (I do not even know, if that way works at all..., never tried myself)

I just read up on https://learn.microsoft.com/en-us/windows/win32/controls/wm-vscroll

Quote
SB_THUMBPOSITION

   The user has dragged the scroll box (thumb) and released the mouse button. The HIWORD indicates the position of the scroll box at the end of the drag operation.

In your code, in the comment is
Code: Pascal  [Select][+][-]
  1.        SendMessage(PageMemo.handle, WM_VSCROLL, // vertical
  2.                    MakeLong(SB_THUMBPOSITION, VrtBarPos), 0);
  3.        VrtBarPos:= SetScrollPos(PageMemo.handle, SB_VERT, VrtBarPos, TRUE); //*GOOD*

But if SB_THUMBPOSITION is sent after the mouse button was released, maybe the "SetScrollPos" needs to be done first?


Maybe do your own WM_VSCroll handler on a component with scrollbar. And observe which message come, and what values the scrollbar has at the time? Then at least you would know if your simulation is correct.



Another idea... (And again, no idea if it will help)

try PostMessage instead.
Then it goes via the message queue.

It may be that all your changes to the selection and what else you do, have already placed messages to that memo. If then you put yours first, the pre-existing messages may just override the effect of yours.
« Last Edit: February 28, 2023, 02:36:52 pm by Martin_fr »

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Need help with ScrollWindowEx
« Reply #37 on: March 02, 2023, 03:00:06 pm »
Martin and all

Here is my alternative code:

Code: Pascal  [Select][+][-]
  1. procedure TCmdForm.btnFindExitClick(Sender: TObject);  // was BtnFndEscClick
  2. var OldSelStart, OldSelLength: longint;
  3.     HrzBarPos, VrtBarPos, VrtBarTgt: longint;
  4.     HrzBarFnd, VrtBarFnd, GetVrtOK, GetHrzOK: boolean;
  5. begin
  6.   try
  7.   PageMemo.Lines.BeginUpdate; // suspend screen update
  8.     FindPanel.visible:= false;
  9.     FindActive:= false;
  10.     PagePassive:= false;
  11.  
  12.     OldSelStart:= PageMemo.SelStart;
  13.     OldSelLength:= PageMemo.SelLength;
  14.  
  15.     VrtBarFnd:= false;
  16.     HrzBarFnd:= false;
  17.  
  18.     VrtBarPos:= -1;
  19.     HrzBarPos:= -1;
  20.     VrtBarTgt:= -1;
  21.  
  22.     GetVrtOK:= false;
  23.     GetHrzOK:= false;
  24.  
  25.     VrtBarFnd:= Is_ScrollBar_Visible(PageMemo.Handle, SB_VERT); // boolean
  26.     HrzBarFnd:= Is_ScrollBar_Visible(PageMemo.Handle, SB_HORZ);
  27.  
  28.     if VrtBarFnd then VrtBarPos:= GetScrollPos(PageMemo.handle,SB_VERT); // integer
  29.     if HrzBarFnd then HrzBarPos:= GetScrollPos(PageMemo.handle,SB_HORZ);
  30.  
  31.     if VrtBarPos>-1 then GetVrtOK:= TRUE else GetVrtOK:= FALSE;
  32.     if HrzBarPos>-1 then GetHrzOK:= TRUE else GetHrzOK:= FALSE;
  33.  
  34.     If GetVrtOK then VrtBarTgt:= GetScrollPos(PageMemo.handle,SB_VERT);
  35.  
  36.     FormResize(Self);  // resizes and positions work panels
  37.     if AppSize=CmdForm.Width  // resets Form to PageWide width
  38.        then PageWideStat.checked:= true
  39.        else PageWideStat.checked:= false;
  40.  
  41.     RichMemoHighlightReset(PageMemo);  // removes document highlighting
  42.  
  43. //=======================================
  44.     // *** SB_THUMBPOSITION Method ***
  45.  
  46.         {
  47.         SendMessage(PageMemo.Handle,
  48.                     WM_VSCROLL,
  49.                     MakeWParam(SB_THUMBPOSITION, VrtBarPos),
  50.                     0);
  51.  
  52.         SB_BOTTOM   Scrolls to the lower right.
  53.         SB_ENDSCROLL   Ends scroll.
  54.         SB_LINEDOWN   Scrolls one line down.
  55.         SB_LINEUP   Scrolls one line up.
  56.         SB_PAGEDOWN    Scrolls one page down.
  57.         SB_PAGEUP   Scrolls one page up.
  58.         SB_THUMBPOSITION   The user has dragged the scroll box (thumb) and
  59.                            released the mouse button. The HIWORD indicates
  60.                            the position of the scroll box at the end of the
  61.                            drag operation.
  62.         SB_THUMBTRACK   The user is dragging the scroll box. This message is
  63.                         sent repeatedly until the user releases the mouse
  64.                         button. The HIWORD indicates the position that the
  65.                         scroll box has been dragged to.
  66.         SB_TOP   Scrolls to the upper left.
  67.         }
  68.  
  69. //=======================================
  70.     // *** KeyInput Method ***
  71.  
  72.     if GetVrtOK then
  73.        begin
  74.        PageMemo.SetFocus;
  75.        VrtBarPos:= GetScrollPos(PageMemo.handle,SB_VERT);
  76.  
  77.        if VrtBarPos>=VrtBarTgt then  // scrolls document to last cursor position
  78.           Begin                      // as per its previous screen view
  79.           while (VrtBarTgt<=GetScrollPos(PageMemo.handle,SB_VERT)) do
  80.                  begin
  81.                  PageMemo.SetFocus;
  82.  
  83.                  //KeyInput.Apply([ssCtrl]);   // use to include CtrlKey
  84.                  KeyInput.Press(VK_UP);  // simulate press of F1 function key
  85.                  KeyInput.Up(VK_UP);    // simulate release of UpArrow key
  86.                  //KeyInput.Unapply([ssCtrl]);  // use to release CtrKey
  87.  
  88.                  // Alternative to KeyInput.Press(VK_UP):
  89.                  // SendMessage(PageMemo.handle, WM_VSCROLL, MAKELONG(SB_LINEUP, 1), longint(0));
  90.                  end;
  91.           PageMemo.SelStart:= OldSelStart;
  92.           PageMemo.SelLength:= OldSelLength;
  93.           end else
  94.               Begin
  95.               while (VrtBarTgt>=GetScrollPos(PageMemo.handle,SB_VERT)) do
  96.                      begin
  97.                      PageMemo.SetFocus;
  98.  
  99.                      //KeyInput.Apply([ssCtrl]);   // use to include CtrlKey
  100.                      KeyInput.Press(VK_DOWN);  // simulate press of F1 function key
  101.                      KeyInput.Up(VK_DOWN);    // simulate release of UpArrow key
  102.                      //KeyInput.Unapply([ssCtrl]);  // use to release CtrKey
  103.  
  104.                      // Alternative to KeyInput.Press(VK_DOWN):
  105.                      // SendMessage(PageMemo.handle, WM_VSCROLL, MAKELONG(SB_LINEDOWN, 1), longint(0));
  106.                      end;
  107.               PageMemo.SelStart:= OldSelStart;
  108.               PageMemo.SelLength:= OldSelLength;
  109.               end;  // end of else
  110.        end;  // end of GetVrtOK
  111.  
  112. //======================================
  113.  
  114.   finally
  115.     PageMemo.SelStart:= OldSelStart;
  116.     PageMemo.SelLength:= OldSelLength;
  117.   PageMemo.Lines.EndUpdate;
  118.   end;
  119. end;
  120.  

I tried to use GetFirstVisibleLine, but it is disfunctional. I am told that it has worked since Windows XP. So I resorted to a funky mechanical method that should work with any system and version. It works with mine. It isn't as smooth as the SB_THUMBPOSITION, but it doesn't work for me at this point. It could involve the double painting, but I attempted to make it work in an isolated condition and its behavior had not changed. This current method only come short because it makes a major blink when it is done, and I don't think there is any way to that. It is apparently an original RichEdit oversight.

Thanks for the help.

Rick
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Need help with ScrollWindowEx
« Reply #38 on: March 02, 2023, 04:03:31 pm »
I would replace this
Code: Pascal  [Select][+][-]
  1.     if VrtBarPos>-1 then GetVrtOK:= TRUE else GetVrtOK:= FALSE;
  2.     if HrzBarPos>-1 then GetHrzOK:= TRUE else GetHrzOK:= FALSE;
with something like that
Code: Pascal  [Select][+][-]
  1.     GetVrtOK := (VrtBarPos > -1);
  2.     GetHrzOK := (HrzBarPos > -1);

I guess many things could be optimized there, but that one really hurt my eyes :-*
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Need help with ScrollWindowEx
« Reply #39 on: March 02, 2023, 05:19:56 pm »
KodeZwerg

I can understand that. I have been moving quickly with things, and as it is, it is self initiating GetVrtOK. I am sure that all of my code could be more elegant. But you should have seen the mess that was generated by my having to test and reject so many other things that failed their worth.

Rick
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Need help with ScrollWindowEx
« Reply #40 on: March 04, 2023, 01:31:57 pm »
I have found one short coming by using either of the WM_VSCROLL or KeyInput methods: both can round out and go one line over or one line under its target.

I haven't found any way to avoid that.

Rick
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Need help with ScrollWindowEx
« Reply #41 on: March 04, 2023, 03:11:15 pm »
I have found a better method. By being in the btnExit procedure there was always a second paint by either subroutines or Mouse and Key events. Too hard to track down, and is probably vital to other routines. So I decided to build an independent procedure that btnExit can call. As it turns out it is one of the Scrollbar functions, and the simplest to use; plus it has a high precision; no over and under issues.

Code: Pascal  [Select][+][-]
  1. procedure TCmdForm.ScrollMemo(TempMemo:TRichMemo; BarType:string; BarTgt:longint);
  2. //  TempMemo: RichMemo Document * Bartype: 'Vrt' or 'Hrz' * BarTgt: ScrollBar Position
  3. //  example ScrollMemo(PageMemo, 'VRT', 12452);
  4. var BarPos: LongInt;
  5. begin
  6. if upcase(BarType)='VRT' then  // vertical
  7.    begin
  8.    BarPos:= GetScrollPos(TempMemo.handle,SB_VERT);
  9.  
  10.    if BarPos>BarTgt then  // scrolls document to last cursor position
  11.       Begin                      // as per its previous screen view
  12.       while (BarTgt<GetScrollPos(TempMemo.handle,SB_VERT)) do
  13.              begin
  14.              TempMemo.VertScrollBar.Position:= TempMemo.VertScrollBar.Position - 1;
  15.  
  16.              {
  17.              ** Alternative method, but can roundout to under of over the target **
  18.              //KeyInput.Apply([ssCtrl]);   // use to include CtrlKey etc.
  19.              KeyInput.Press(VK_UP);  // simulate press of F1 function key
  20.              KeyInput.Up(VK_UP);    // simulate release of UpArrow key
  21.              //KeyInput.Unapply([ssCtrl]);  // use to release CtrKey etc.
  22.              }
  23.  
  24.              {
  25.              ** Alternative method, but can roundout to under of over the target **
  26.              SendMessage(TempMemo.handle, WM_VSCROLL, MAKELONG(SB_LINEUP, 1), longint(0));
  27.              }
  28.              end;
  29.       end else
  30.           Begin
  31.           while (BarTgt>GetScrollPos(TempMemo.handle,SB_VERT)) do
  32.                  begin
  33.                  TempMemo.VertScrollBar.Position:= TempMemo.VertScrollBar.Position + 1;
  34.                  end;
  35.           end;  // end of else
  36.    end; // end VERTICAL BarType
  37.  
  38. if upcase(BarType)='HRZ' then  // horizontal
  39.    begin
  40.    BarPos:= GetScrollPos(TempMemo.handle,SB_HORZ);
  41.  
  42.    if BarPos>BarTgt then  // scrolls document to last cursor position
  43.       Begin                      // as per its previous screen view
  44.       while (BarTgt<GetScrollPos(TempMemo.handle,SB_HORZ)) do
  45.              begin
  46.              TempMemo.HorzScrollBar.Position:= TempMemo.HorzScrollBar.Position - 1;
  47.  
  48.              {
  49.              ** Alternative method, but can roundout to under of over the target **
  50.              //KeyInput.Apply([ssCtrl]);   // use to include CtrlKey etc.
  51.              KeyInput.Press(VK_LEFT);  // simulate press of F1 function key
  52.              KeyInput.Up(VK_LEFT);    // simulate release of UpArrow key
  53.              //KeyInput.Unapply([ssCtrl]);  // use to release CtrKey etc.
  54.              }
  55.  
  56.              {
  57.              ** Alternative method, but can roundout to under of over the target **
  58.              // SendMessage(TempMemo.handle, WM_HSCROLL, MAKELONG(SB_LEFT, 1), longint(0));
  59.              }
  60.              end;
  61.       end else
  62.           Begin
  63.           while (BarTgt>GetScrollPos(TempMemo.handle,SB_HORZ)) do
  64.                  begin
  65.                  TempMemo.HorzScrollBar.Position:= TempMemo.HorzScrollBar.Position + 1;
  66.                  end;
  67.           end;  // end of else
  68.    end; // end HORIZONTAL BarType
  69. end;
  70.  

Rick
« Last Edit: March 04, 2023, 03:13:04 pm by rick2691 »
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

rick2691

  • Sr. Member
  • ****
  • Posts: 444
Re: Need help with ScrollWindowEx
« Reply #42 on: March 05, 2023, 05:56:55 pm »
Et. Al.

What bothers me is that I can do
Code: Pascal  [Select][+][-]
  1. TempMemo.VertScrollBar.Position:= TempMemo.VertScrollBar.Position - 1;
  2.  
creeping up one pixel at a time to BarTgt, and it is perfect, but I cannot do
Code: Pascal  [Select][+][-]
  1. TempMemo.VertScrollBar.Position:= BarTgt;
  2.  
It is evidence of severe disfunction, because it does nothing.
Windows 11, LAZ 2.0.10, FPC 3.2.0, SVN 63526, i386-win32-win32/win64, using windows unit

 

TinyPortal © 2005-2018