Page 1 of 1

EditorGadget scroll bar bug

Posted: Fri Jun 29, 2007 9:34 am
by Heis Spiter
Hi there,

Here is a small, present in each PureBasic release. When you use a text that is too long, in an EditorGadget, an horizontal scroll bar is displayed. And we can "browse" the text using it in two ways. Move bar, or click arrow. And the bug happens when using right arrow. Scroll bar is infinite when using arrow. It doesn't stop when text is finished.
An example :

Code: Select all

If OpenWindow(0, 0, 0, 322, 150, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0)) 
  EditorGadget(0, 8, 8, 306, 133) 
  AddGadgetItem(0, 0, "This is a too long text : it can't be displayed completly. You'll have to use scrollbar !")  
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow 
EndIf
Moreover, I've a suggestion, it could be great to have a flag for EditorGadget in order to have automatic wrap with too long lines.

Posted: Mon Jul 23, 2007 10:28 pm
by Fred
It looks like a 'feature' of the RichEdit control. Can anyone else confirm ?

Posted: Mon Jul 23, 2007 10:49 pm
by tinman
That happens in WordPad under XP so it doesn't look like a PureBasic only issue. You need to change the options to not wrap to see it.

Posted: Tue Jul 24, 2007 6:30 am
by Heis Spiter
tinman wrote:That happens in WordPad under XP so it doesn't look like a PureBasic only issue. You need to change the options to not wrap to see it.
That's strange :?. Before doing my bug report, I've tried with Notepad, and it didn't do that. Scrolling was blocked when there wasn't text anymore to display...

Posted: Tue Jul 24, 2007 11:59 am
by byo
I may be wrong but I think Notepad doesn't use the Richedit control.

Posted: Tue Jul 24, 2007 9:57 pm
by tinman
byo wrote:I may be wrong but I think Notepad doesn't use the Richedit control.
You are correct, Notepad uses the "Edit" class and Wordpad uses "RICHED50W" (at least here on my XPsp2).