StringGadget and RedrawWindow_()

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by searhin.

Hi,#

-- Window with colored StringGadget flickers on RedrawWindow_() command --#


I use a MultiLine string gadget with the AutoVScroll, VScroll, DisableLeft and DisableRight parameters. Background and text colors were changed with an SetWindowCallback (and SetTextColor).#


Now, if i change the content of this string, the text to the right of the cursor gets shifted by the width of the inserted letter without the old text being replaced. So, after a few inserted characters it becomes an unreadable blur of stacked characters.##


A RedrawWindow command does help, but then the window flickers with each StringGadget change.#


Before, i tried a simple SetGadgetText(x,GetGadgetText(x)). Then the window does not flicker, but the cursor position is reset to the beginning of the string after each input.#


Does anyone have similar problems or a solution to this one?#
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.

Try this:

Code: Select all

SetClassLong_(WindowID(), #CL_STYLE, #GCL_CS_DBLCLKS)
El_Choni
Post Reply