EnableExplicit Define EventID Define RTFString$ Procedure TextGadgetEx(Gadget, x, y, Width, Height, Text$, Flags = 0) EditorGadget(Gadget, x, y, Width, Height, Flags) DisableGadget(Gadget, 1) SetWindowTheme_(GadgetID(Gadget), @"", @"") SetWindowLongPtr_(GadgetID(Gadget), #GWL_EXSTYLE, 0) SendMessage_(GadgetID(Gadget), #EM_SHOWSCROLLBAR, #SB_HORZ, #False) SendMessage_(GadgetID(Gadget), #EM_SHOWSCROLLBAR, #SB_VERT, #False) SetWindowPos_(GadgetID(Gadget), 0, 0, 0, 0, 0, #SWP_NOMOVE | #SWP_NOSIZE | #SWP_FRAMECHANGED) SetGadgetColor(Gadget, #PB_Gadget_FrontColor, RGB(0, 0, 0)) SetGadgetText(Gadget, Text$) EndProcedure If OpenWindow(0, 0, 0, 500, 400, "Window", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) RTFString$ + "{\rtf1" RTFString$ + "Hallo Welt!" RTFString$ + "\par" RTFString$ + "{\i Dies} ist ein " RTFString$ + "formatierter {\b Text}." RTFString$ + "\par" RTFString$ + "{\colortbl;\red0\green0\blue0;\red255\green0\blue0;}" RTFString$ + "\cf2 Farbiger Text" RTFString$ + "}" TextGadgetEx(1, 10, 10, WindowWidth(0)-20, 50, RTFString$) Repeat EventID = WaitWindowEvent() If EventID = #PB_Event_CloseWindow End EndIf ForEver EndIf