Editor Gadget

Just starting out? Need help? Post your questions and find answers here.
Nubcake
Enthusiast
Enthusiast
Posts: 195
Joined: Thu Feb 03, 2011 7:44 pm

Editor Gadget

Post 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 ?
BigB0ss
New User
New User
Posts: 9
Joined: Sun Jun 01, 2008 12:28 pm
Location: The Netherlands

Re: Editor Gadget

Post 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
Nubcake
Enthusiast
Enthusiast
Posts: 195
Joined: Thu Feb 03, 2011 7:44 pm

Re: Editor Gadget

Post 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?
User avatar
em_uk
Enthusiast
Enthusiast
Posts: 366
Joined: Sun Aug 08, 2010 3:32 pm
Location: Manchester UK

Re: Editor Gadget

Post by em_uk »

Use this to scroll one line up :

Code: Select all

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

R Tape loading error, 0:1
Post Reply