Page 1 of 1

EditorGadget and RTF files in PB 6.02 Beta 1

Posted: Tue Apr 18, 2023 8:06 pm
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

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

Posted: Tue Apr 18, 2023 10:39 pm
by Fred
You need to explicitly enable RTF mode for editor, it was an hidden feature

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

Posted: Wed Apr 19, 2023 6:09 am
by loulou2522
Thanks Fred
Can you say me how to enable RTF in editor gadget
Thanks

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

Posted: Wed Apr 19, 2023 8:37 am
by Fred
It should do the trick:

Code: Select all

SendMessage_(GadgetID(x), #EM_SETTEXTMODE, #TM_RICHTEXT, 0)

Re: EditorGadget and RTF files in PB 6.02 Beta 1

Posted: Wed Apr 19, 2023 1:36 pm
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()

Re: EditorGadget and RTF files in PB 6.02 Beta 1

Posted: Wed Apr 19, 2023 3:23 pm
by Fred
Only Windows would support it, so I don't see the use of an additional flag here