Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » RawRichText - is it possible to have a fixed width RichTable column?
RawRichText - is it possible to have a fixed width RichTable column? [message #51372] Sun, 17 March 2019 00:20 Go to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 219
Registered: June 2011
Experienced Member
I have the document in a resizable window but AddColumn is given in proportional ratios so it shifts the content over when I resize.
Re: RawRichText - is it possible to have a fixed width RichTable column? [message #51411 is a reply to message #51372] Fri, 22 March 2019 17:18 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
No, it is always proportional, sorry.

Depending on situation, it might be possible to recreate the content on each resize and change the ratios.

Mirek
Re: RawRichText - is it possible to have a fixed width RichTable column? [message #51413 is a reply to message #51411] Sat, 23 March 2019 00:56 Go to previous messageGo to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 219
Registered: June 2011
Experienced Member
Thanks Mirek,
I think I could do that without issue. I don't even care if it's proportional so long as I could shrink-to-fit the leftmost column with some padding. It's just a data logger with the time given in the left column, right-aligned with some padding and a fixed zoom factor.

[Updated on: Sat, 23 March 2019 00:57]

Report message to a moderator

Re: RawRichText - is it possible to have a fixed width RichTable column? [message #51418 is a reply to message #51372] Sun, 24 March 2019 07:15 Go to previous messageGo to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 219
Registered: June 2011
Experienced Member
No Message Body

[Updated on: Sun, 24 March 2019 07:16]

Report message to a moderator

Re: RawRichText - is it possible to have a fixed width RichTable column? [message #51419 is a reply to message #51411] Sun, 24 March 2019 07:16 Go to previous messageGo to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 219
Registered: June 2011
Experienced Member
I ended up dealing with it differently by moving back to RichPara, creating a RichObjectType, overriding paint and aligning right with DrawText and GetTextSize. The only problem I have left as that I need the text after the time field to wrap to a point after the time field. If it's multiline that's no problem - I can just create a margin. Is there any way to override wrapping so that it has a left margin?
Re: RawRichText - is it possible to have a fixed width RichTable column? [message #51421 is a reply to message #51411] Sun, 24 March 2019 12:10 Go to previous messageGo to next message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 219
Registered: June 2011
Experienced Member
To be clear, this is what I want to fix:
https://i.imgur.com/1i7pFZP.png

Edit Never mind, I found it with:

para.format.indent = 60;
para.format.bullet = RichPara::BULLET_TEXT;

[Updated on: Sun, 24 March 2019 14:45]

Report message to a moderator

Re: RawRichText - is it possible to have a fixed width RichTable column? [message #51435 is a reply to message #51421] Mon, 25 March 2019 13:30 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Yes, that sounds like a good solution.

BTW: Notice the existence of QTF. It is usually easier to use QTF instead of fiddling with RichText/RichPara objects directly.

Mirek
Re: RawRichText - is it possible to have a fixed width RichTable column? [message #51436 is a reply to message #51435] Mon, 25 March 2019 13:48 Go to previous message
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 219
Registered: June 2011
Experienced Member
That's what I'd normally do but for this application I'm using raw because I have a custom parser designed for parsing simple markdown and I'm definitely going to be having custom RichObjectTypes/possible extensions. I fibbed a bit when I said it was a "logger" (sorry). It's actually a discord client, but I don't want to get anyone's hopes up as to whether I will complete it and release it (to be a proper client it's going to need animated .gif, .webm support, etc). It's very much a learning project at this phase.
Previous Topic: How to add/enable spell-CORRECTING with richedit (not-quite-solved-sort-of)
Next Topic: Potential QTF minor bug or misunderstanding
Goto Forum:
  


Current Time: Thu Mar 28 13:55:21 CET 2024

Total time taken to generate the page: 0.01163 seconds