Page 1 of 1

Editor Gadget

Posted: Fri Feb 04, 2011 10:16 pm
by Nubcake
Is there a way for the scroll bar in the editor gadget to stay down and be still when you keep on typing , i'm using it for a chatbox but when you come down to the edge it just stays there and you have to keep scrolling with the mouse . How can you keep it down ?

Re: Editor Gadget

Posted: Fri Feb 04, 2011 10:26 pm
by BigB0ss

Code: Select all

SendMessage_(GadgetID(0), #EM_SETSEL,-1,-1)
Example:

Code: Select all

Repeat
 Select WindowEvent()
  Case #PB_Event_Gadget
   Select EventGadget()
    Case 0 ;EDITOR GADGET
    SendMessage_(GadgetID(0), #EM_SETSEL,-1,-1)
   EndSelect
 EndSelect
Forever

Re: Editor Gadget

Posted: Fri Feb 04, 2011 11:28 pm
by Nubcake
[quote="BigB0ss"]

Code: Select all

SendMessage_(GadgetID(0), #EM_SETSEL,-1,-1)
This works , however it scrolls 1 line ahead than it should be , when i try to scroll down a bit it moves up 1 line , can you do anything about this?

Re: Editor Gadget

Posted: Mon Nov 28, 2011 5:44 pm
by em_uk
Use this to scroll one line up :

Code: Select all

SendMessage_(GadgetID(Gadget), #WM_VSCROLL, #SB_LINEUP, -1)