unodgs Messages: 1366 Registered: November 2005 Location: Poland
Ultimate Contributor
This is like in any other text editor. Justification is set to the whole line. If you want to have part of line aligned to the left and rest of line aligned to the right use transparent table and set proper align mode in each cell.
lundman Messages: 175 Registered: March 2006 Location: Tokyo
Experienced Member
Thanks! That answers it..
It is these small questions that are hard to get answers for when you've just started.
Like if I use a RichTextView (as I want coloured text) as a log Window output, (just adding lines) I can't get it to auto scroll/view the last line. With DocEdit I used
.SetCursor(.GetLength());
.ScrollView(0, .GetLength());
.. but with RichText there is no SetCursor(). But that could have something to do with the way I "add a line".
rtv <<= ~rtv + newline;
.. is there a better way?
Is there a nice way to sort DropList?
All tiny questions not worth asking on their own, but on the list of things I need to track down to make the application a nice experience
Yeah, figured that would be expensive, but if I wanted colour, it didn't seem like I had a choice..
Not that I have a RichEdit type either, newer version needed?
Is not part of CtrlLib, you have to add RichEdit package... (in other words, standard "GUI application" template does not add it, you have to add it manually).
lundman Messages: 175 Registered: March 2006 Location: Tokyo
Experienced Member
Right, got that working ok and well.. it's quite amusing
So for a log output window, its got a Ruler, spell checks all the lines I print out, with non-printable chars replaced by placemarkers ... but I assume I can probably disable most of that.
lundman Messages: 175 Registered: March 2006 Location: Tokyo
Experienced Member
Actually, sorry to be dense, but, I can't see a Insert/Add of strings/text to the end of a RichEdit. I can only re-assign the full thing like I did before. True I have a ScrollToCursor() at least so maybe I can sort the scrolling out.
lundman Messages: 175 Registered: March 2006 Location: Tokyo
Experienced Member
Thanks.
PasteText, and indeed Insert, both take RichText. I have not yet been able to find out how to go from String to RichText. SetFooter() is about the only method that deals with String. (and GetPlainText() ).
Although, I can use:
RichEdit p;
RichText a;
p <<= the_new_input_String;
a = p.CopyText(0, p.GetLength());
bot.output.Select(bot.output.GetLength(), 1);
bot.output.SetEditable(true);
bot.output.PasteText(a);
bot.output.SetEditable(false);
Ugly as hell, but that'll do.. Now to get rid of those "space" and "newline" icon indicators.
ShowCodes(Null) seems to do that.
Turning off the spellchecker... not possible? Can't even change colour, they are hardcoded as Red/LtRed.
lundman Messages: 175 Registered: March 2006 Location: Tokyo
Experienced Member
Actually... I find that if you resize the window the font(!) changes size with it. That is quite undesirable and quite peculiar... Can I turn that off? I don't set Zoomable() for the Layout, but that makes no difference.
Looking at the sources, Paint seems to call GetZoom, that just gets the rectangle of the widget, making the suspect I can not turn that off.
Actually... I find that if you resize the window the font(!) changes size with it. That is quite undesirable and quite peculiar... Can I turn that off? I don't set Zoomable() for the Layout, but that makes no difference.
Looking at the sources, Paint seems to call GetZoom, that just gets the rectangle of the widget, making the suspect I can not turn that off.
Yes, that is correct. Looks like I have mislead you somewhat here... (I did not realized there will be this zooming problem...)
Anyway, perhaps it is the time to use ArrayCtrl as suggested?
In fact, even creating your own widget would not be that hard. Maybe it is even better option than trying to adapt something else (simple widgets development always was U++'s primary goal).