RonShortt
-
Posts
10 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by RonShortt
-
-
It's funny but I had misread the TextArea widget and thought it was an input field so it does do exactly what I need. Thanks for the advice.
-
It is an area of the screen where I am writing output from the program on an ongoing basis as the program runs. I will take a closer look at the text area widget this evening and see if I can use that to accomplish the same thing.
-
So I dug out my 30 year old copy of Introduction to the X Window System (Updated for XVIIR4) and started reading. In the section on fonts it says:
QuoteIf there is any special action to be taken for control characters, the application must be programmed to take it explicitly.
That would indicate that either Ultra App Kit or my program must deal with the newline character as the X Window system simply treats it as just another (unprintable) character.
- 1
-
Thanks, Josh. I appreciate it!!
-
I have used GetText to retrieve the text after it is (improperly) displayed and printed it via cout and the newline in the returned string works as expected. The issue seems to be that the Linux library is not dealing with the newline in the same (proper) manner as the Windows library.
- 1
-
3 hours ago, Roland said:
Unfortunately std::endl operates on the output I/O system rather than providing a newline character. According to the link you provided:
QuoteInserts a newline character into the output sequence os and flushes it as if by calling os.put(os.widen('\n')) followed by os.flush().
This is an output-only I/O manipulator, it may be called with an expression such as out << std::endl for any out of type std::basic_ostream.
- 1
-
My program is working fine in Windows when I use '\n' in a c++ string to get a newline in the text of a label. I have now compiled it on Linux and the newline character is displayed as a character block as if the character cannot be displayed. Is there a way to get Linux to execute the same way as Windows. Here is sample code (a slightly modified version of the label sample code)?
#include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 800, 600, displays[0]); //Create User Interface auto ui = CreateInterface(window); //Create widget auto label1 = CreateLabel("Label", 20, 20, 120, 30, ui->root); auto label2 = CreateLabel("Border\nLabel", 20, 50, 120, 60, ui->root, LABEL_BORDER | LABEL_CENTER | LABEL_MIDDLE); while (window->Closed() == false) { WaitEvent(); } return 0; }
-
That is exactly what I was looking for! Thank you very much! I am really enjoying programming with this package.
-
I am loading a number of SVG icon files and wondered if there was a way to embed them in the C++ source code so that I don't need to include the files with the executable. LoadIcon only accepts a file name or Stream as the icon source.
TEXTAREA_WORDWRAP doesn't reflect text resized using Widget::SetFontScale
in Bug Reports
Posted
A textarea using TEXTAREA_WORDWRAP and SetFontScale does not wrap text correctly. Adding
textarea->SetFontScale(1.5);
to the textarea example code results in text which goes off the screen to the right.
Untitled.bmp