Page 3 of 3

Re: Once again about multiline StringGadget...

Posted: Mon Apr 05, 2010 12:11 pm
by Perkin
Check out this thread
http://www.purebasic.fr/english/viewtop ... 12&t=40178

I think the EditorGadget is only limited by available mem, but I may be wrong (won't be the first time :wink: )

In that thread, is also a line about setting the Gadget to text only (no rtf)

Re: Once again about multiline StringGadget...

Posted: Mon Apr 05, 2010 12:25 pm
by Melissa
Check out this thread
Well, it's not like I'm so intereted in menu to do my own.
I think the EditorGadget is only limited by available mem, but I may be wrong (won't be the first time )
May be, may be...
In that thread, is also a line about setting the Gadget to text only (no rtf)
Already managed to do it, thanks.

Re: Once again about multiline StringGadget...

Posted: Mon Apr 05, 2010 12:54 pm
by Fluid Byte
Image

*** added to ignore list ***

Re: Once again about multiline StringGadget...

Posted: Mon Apr 05, 2010 1:08 pm
by RASHAD
Sorry FB
I thought it could be 2 chance
Sorry again you are 100% right

Re: Once again about multiline StringGadget...

Posted: Mon Apr 05, 2010 1:19 pm
by Melissa
*** added to ignore list ***
Image

P.S. Well, I think I would switch to EditorGadget for now. Not perfect, of course, but still looks good enough, except for lack of international menu. Still, I can't believe that it's impossible to fulfill my original request -_-.

Re: Once again about multiline StringGadget...

Posted: Mon Apr 05, 2010 1:19 pm
by Fangbeast
Fluid Byte wrote:Image

*** added to ignore list ***
Fluid Byte, how the hell did you know what I look like in the morning before a shave and a wash??? I've been looking for your secret webcam all day and still can't find it!

Re: Once again about multiline StringGadget...

Posted: Mon Apr 05, 2010 1:50 pm
by Fluid Byte
Fangbeast wrote:I've been looking for your secret webcam all day and still can't find it!
Try harder :P

Re: Once again about multiline StringGadget...

Posted: Mon Apr 05, 2010 6:47 pm
by Melissa
...Hmm, just measured speed of EditorGadget - it seems to work a lot faster with very long strings. I was nearly going to use it for one more field, but got new problem: setting EG to single-line mode on run-time seems to be impossible. Any work-arounds here ?

Re: Once again about multiline StringGadget...

Posted: Mon Apr 05, 2010 6:55 pm
by Perkin
to turn the wordwrap off again change the last param of the SendMessage to 1

Code: Select all

SendMessage_(GadgetID(#EditGad), #EM_SETTARGETDEVICE, #Null, 1)

Re: Once again about multiline StringGadget...

Posted: Mon Apr 05, 2010 6:58 pm
by Melissa
OK, it seems to be part of solution. Now I need to somehow disable ENTER and other CR-emitters for that field.

Re: Once again about multiline StringGadget...

Posted: Mon Apr 05, 2010 7:01 pm
by Perkin
I don't think you can disable the displaying of them, what you might have to do is a replacestring for #CRLF$
only prob would be they would be gone for good.

Re: Once again about multiline StringGadget...

Posted: Mon Apr 05, 2010 7:04 pm
by Melissa
This isn't a problem, I'm more afraid of flickering... Well, there was already some plans to kill all spaces in that field, so I would try.

Re: Once again about multiline StringGadget...

Posted: Mon Apr 05, 2010 7:08 pm
by Arctic Fox
Try subclassing it.

Code: Select all

Global OldEditorProc

Procedure EditorProc(Handle, Message, wParam, lParam)
Protected result

If Message = #WM_KEYDOWN And wParam = 13
result = #False

Else
result = CallWindowProc_(OldEditorProc, Handle, Message, wParam, lParam)
EndIf

ProcedureReturn result
EndProcedure

OpenWindow(0, 100, 100, 300, 300, "")
EditorGadget(0, 5, 5, 290, 290)

OldEditorProc = SetWindowLong_(GadgetID(0), #GWL_WNDPROC, @EditorProc())

Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow

End

Re: Once again about multiline StringGadget...

Posted: Tue Apr 06, 2010 8:25 am
by Melissa
Fair enough. Now some solution for filtering unwanted characters from pasted fragments, please.

Re: Once again about multiline StringGadget...

Posted: Tue Apr 06, 2010 5:04 pm
by Melissa
Well, well, well… finally managed to do one-lined EditorGadet through defining my custom one. No, just one more (and last) question: is there any way to disable NOHIDESEL for vanilla EG without screwing everything up to point of crashing on Win7 ? I already implemented it through custom #WM_KILLFOCUS catcher, but still curious.