Just starting out? Need help? Post your questions and find answers here.
Perkin
Enthusiast
Posts: 504 Joined: Thu Jul 03, 2008 10:13 pm
Location: Kent, UK
Post
by Perkin » Mon Apr 05, 2010 12:11 pm
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
)
In that thread, is also a line about setting the Gadget to text only (no rtf)
%101010 = $2A = 42
Melissa
User
Posts: 71 Joined: Tue Sep 22, 2009 3:13 pm
Post
by Melissa » Mon Apr 05, 2010 12:25 pm
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.
Fluid Byte
Addict
Posts: 2336 Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany
Post
by Fluid Byte » Mon Apr 05, 2010 12:54 pm
*** added to ignore list ***
RASHAD
PureBasic Expert
Posts: 4946 Joined: Sun Apr 12, 2009 6:27 am
Post
by RASHAD » Mon Apr 05, 2010 1:08 pm
Sorry FB
I thought it could be 2 chance
Sorry again you are 100% right
Egypt my love
Melissa
User
Posts: 71 Joined: Tue Sep 22, 2009 3:13 pm
Post
by Melissa » Mon Apr 05, 2010 1:19 pm
*** added to ignore list ***
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 -_-.
Fangbeast
PureBasic Protozoa
Posts: 4789 Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)
Post
by Fangbeast » Mon Apr 05, 2010 1:19 pm
Fluid Byte wrote:
*** 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!
Amateur Radio/VK3HAF , (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Fluid Byte
Addict
Posts: 2336 Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany
Post
by Fluid Byte » Mon Apr 05, 2010 1:50 pm
Fangbeast wrote: I've been looking for your secret webcam all day and still can't find it!
Try harder
Melissa
User
Posts: 71 Joined: Tue Sep 22, 2009 3:13 pm
Post
by Melissa » Mon Apr 05, 2010 6:47 pm
...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 ?
Perkin
Enthusiast
Posts: 504 Joined: Thu Jul 03, 2008 10:13 pm
Location: Kent, UK
Post
by Perkin » Mon Apr 05, 2010 6:55 pm
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)
%101010 = $2A = 42
Melissa
User
Posts: 71 Joined: Tue Sep 22, 2009 3:13 pm
Post
by Melissa » Mon Apr 05, 2010 6:58 pm
OK, it seems to be part of solution. Now I need to somehow disable ENTER and other CR-emitters for that field.
Perkin
Enthusiast
Posts: 504 Joined: Thu Jul 03, 2008 10:13 pm
Location: Kent, UK
Post
by Perkin » Mon Apr 05, 2010 7:01 pm
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.
%101010 = $2A = 42
Melissa
User
Posts: 71 Joined: Tue Sep 22, 2009 3:13 pm
Post
by Melissa » Mon Apr 05, 2010 7:04 pm
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.
Arctic Fox
Enthusiast
Posts: 609 Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark
Post
by Arctic Fox » Mon Apr 05, 2010 7:08 pm
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
Melissa
User
Posts: 71 Joined: Tue Sep 22, 2009 3:13 pm
Post
by Melissa » Tue Apr 06, 2010 8:25 am
Fair enough. Now some solution for filtering unwanted characters from pasted fragments, please.
Last edited by
Melissa on Tue Apr 06, 2010 5:04 pm, edited 1 time in total.
Melissa
User
Posts: 71 Joined: Tue Sep 22, 2009 3:13 pm
Post
by Melissa » Tue Apr 06, 2010 5:04 pm
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.