Text dump in window
Text dump in window
On a console you can use the print command to quickly dump out huge amounts of text. When using the debugger you can use the debug command. But in a compiled program I always missed a command to easily write text into a window for streaming output. You can use gadgets for that but a simple command just for some quick text output would be neat.
Does not a simple MessageRequester() answer ?
Or maybe you have a better way you would describe for suggestion ...
Rgrds
Or maybe you have a better way you would describe for suggestion ...
Rgrds
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.
The window size should be variable and there should be a text output box (a bit like the editor gadget) with a scroll bar so you could scroll back. It should be possible to add text each time you issue the print command.
Example:
Example:
Code: Select all
OpenTextWindow(0, 100, 100, 200, 200)
WPrintN("Hello World!")
CloseTextWindow(0)
Here's a way you could emulate it for the time being:
> The window size should be variable and there should be a text output box
> (a bit like the editor gadget) with a scroll bar so you could scroll back
Sounds like you just described a ListViewGadget.
Code: Select all
Procedure WPrintN(text$)
Static y : StartDrawing(WindowOutput()) : DrawingMode(1)
Locate(0,y) : DrawText(text$) : y+16 : StopDrawing()
EndProcedure
If OpenWindow(0,200,200,400,300,#PB_Window_SystemMenu,"test")
For r=1 To 10 : WPrintN(Str(r)) : Next
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
> (a bit like the editor gadget) with a scroll bar so you could scroll back
Sounds like you just described a ListViewGadget.

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