EditorGadget and RTF files in PB 6.02 Beta 1

Just starting out? Need help? Post your questions and find answers here.
loulou2522
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Oct 14, 2014 12:09 pm

EditorGadget and RTF files in PB 6.02 Beta 1

Post by loulou2522 »

In PB 6.02 Beta 1 that a regression happen with editor gadget.
It is not pssible to integrate RTF command. Editor gadget doesn't read correctly the rtf files
In PB 6.01 this functionality works well
Last edited by loulou2522 on Wed Apr 19, 2023 9:58 am, edited 1 time in total.
Fred
Administrator
Administrator
Posts: 18154
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Bug with EditorGadget and RTF files in PB 6.02 Beta 1

Post by Fred »

You need to explicitly enable RTF mode for editor, it was an hidden feature
loulou2522
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Oct 14, 2014 12:09 pm

Re: Bug with EditorGadget and RTF files in PB 6.02 Beta 1

Post by loulou2522 »

Thanks Fred
Can you say me how to enable RTF in editor gadget
Thanks
Fred
Administrator
Administrator
Posts: 18154
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Bug with EditorGadget and RTF files in PB 6.02 Beta 1

Post by Fred »

It should do the trick:

Code: Select all

SendMessage_(GadgetID(x), #EM_SETTEXTMODE, #TM_RICHTEXT, 0)
Axolotl
Addict
Addict
Posts: 802
Joined: Wed Dec 31, 2008 3:36 pm

Re: EditorGadget and RTF files in PB 6.02 Beta 1

Post by Axolotl »

Wouldn't it be nicer with this addition?

Code: Select all

; Syntax 
;	 Result = EditorGadget(#Gadget, x, y, Width, Height [, Flags])
;
; existing Flags 
;  #PB_Editor_ReadOnly		;: the user cannot edit the text in the gadget.
;  #PB_Editor_WordWrap		;: the lines too long To be displayed will be wrapped still displayed completely
;
; additional Flags 
 	#PB_Editor_RichText 	;: indicates rich-text mode, in which the gadget has the standard rich edit functionality 
	#PB_Editor_PlainText 	;: indicates plain-text mode, in which the gadget is similar to a standard StringGadget 
  
Ha, I knew it, asked for that already....
New Flag(s) for EditorGadget()
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
Fred
Administrator
Administrator
Posts: 18154
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: EditorGadget and RTF files in PB 6.02 Beta 1

Post by Fred »

Only Windows would support it, so I don't see the use of an additional flag here
Post Reply