It is currently Tue Jan 26, 2021 3:36 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: EditorGadget, Wordwrap
PostPosted: Sun Jun 08, 2003 3:15 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed May 28, 2003 6:57 am
Posts: 196
Location: Munich
How can I set wordwrap mode in an EditorGadget
(instead of horizontal scrolling)?

_________________
Horst.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jun 08, 2003 4:51 pm 
Offline
TailBite Expert
TailBite Expert

Joined: Fri Apr 25, 2003 6:09 pm
Posts: 1007
Location: Spain
Code:
If OpenWindow(0, 100, 200, 195, 260, #PB_Window_SystemMenu|#PB_Window_MinimizeGadget, "PureBasic Window")=0:End:EndIf
If CreateGadgetList(WindowID())=0:End:EndIf
EditorGadget(0, 0, 0, WindowWidth(), WindowHeight())
SendMessage_(GadgetID(0), #EM_SETTARGETDEVICE, #NULL, 0)
;SendMessage_(GadgetID(0), #EM_SETTARGETDEVICE, #NULL, $FFFFFF) ; to turn word-wrap off again (use just a huge value, stands for line width)
SetGadgetText(0, "This text gets wrapped, but I think line numbers won't be properly handled now, so be careful.")
Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow
End

_________________
El_Choni


Last edited by El_Choni on Sun Jun 08, 2003 7:04 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jun 08, 2003 6:48 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed May 28, 2003 6:57 am
Posts: 196
Location: Munich
Thanks, El_Choni :D
Works perfectly.

_________________
Horst.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat May 15, 2004 12:53 pm 
Offline
New User
New User

Joined: Sat May 15, 2004 12:52 pm
Posts: 4
Thanks from me, too. I was searching for something like that also :D


Top
 Profile  
Reply with quote  
 Post subject: Re: EditorGadget, Wordwrap
PostPosted: Sun Sep 04, 2005 6:22 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Fri Apr 25, 2003 5:24 pm
Posts: 7581
(Just adding the phrase "word wrap" here so it comes up in searches). ;)

_________________
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Sep 04, 2005 8:07 am 
Offline
Addict
Addict
User avatar

Joined: Sun Mar 07, 2004 8:47 am
Posts: 1861
Location: Argentina
Editor Gadget Word Wrap - auto wrapping - editor wrap - auto wrap - editor word wrap

Nice! Should be on the codearchiv (or is it already?)

_________________
! Black holes are where God divided by zero !
My little blog!
(Not for the faint hearted!)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: Seymour Clufley and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye