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... » QTF Centered in ArrayCtrl header
QTF Centered in ArrayCtrl header [message #56872] Fri, 23 April 2021 16:42 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Hi,

this ljne
	kCtrl.AddColumn(t_("\1[G1= Service&class]")).Margin(0).NoEdit().HeaderTab();


Should add a centered text inside a ArrayCtrl column header... it used to work last time I
compiled my application; now it doesn't and displays a blank line.
Something is happening, because if I change text size (example G6) it does increase the cell,
but the content is blank.
If I remove the '=' :
	kCtrl.AddColumn(t_("\1[G1 Service&class]")).Margin(0).NoEdit().HeaderTab();

it works, but of course the text is left-justified.

It's a bug or am I missing something ?

EDIT: I tested also with < (left align) and it works; > (right align) doesn't. It seems that the cell width
is wrong when calculating text position.

EDIT2:
Modifying the code as:
	kCtrl.AddColumn(t_("\1[G1 Service&class]")).Margin(0).NoEdit().HeaderTab().SetAlign(ALIGN_CENTER);


(so, semove the '=' and add SetAlign() call) the text is 'centered', i.e. the first line ('Service') is centered
but the second is left aligned with 'Service' word:
    First wird
    Second

and not
    First word
      second


[Updated on: Fri, 23 April 2021 16:54]

Report message to a moderator

Re: QTF Centered in ArrayCtrl header [message #56873 is a reply to message #56872] Fri, 23 April 2021 17:01 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Here a screenshot with the SetAlign(); you can see that the "word block" is centered, and not the single words.
Before, with '=' in QTF, single words were correctly centered.
You can also see the effect of '=' on 4 column : the text is gone.

index.php?t=getfile&id=6429&private=0

[Updated on: Fri, 23 April 2021 17:03]

Report message to a moderator

Re: QTF Centered in ArrayCtrl header [message #56907 is a reply to message #56873] Wed, 28 April 2021 23:32 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Should be ok now.

(It was the classical situation when fixing something breaks something else. That said, the change was in 2014 if I read the log correctly...)
Re: QTF Centered in ArrayCtrl header [message #56911 is a reply to message #56907] Thu, 29 April 2021 08:47 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
mirek wrote on Wed, 28 April 2021 23:32
Should be ok now.

(It was the classical situation when fixing something breaks something else. That said, the change was in 2014 if I read the log correctly...)


Thank you, Mirek !
2014 ? I'm becoming old quickly... Rolling Eyes
Re: QTF Centered in ArrayCtrl header [message #56912 is a reply to message #56911] Thu, 29 April 2021 09:58 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
mdelfede wrote on Thu, 29 April 2021 08:47

2014 ? I'm becoming old quickly... Rolling Eyes


Welcom to the club... Smile
Previous Topic: Bugfix: Report header/footer looks good in dark mode, not dark
Next Topic: Change proposal: line break in RichType / fieldparts
Goto Forum:
  


Current Time: Fri Apr 19 01:24:44 CEST 2024

Total time taken to generate the page: 0.02742 seconds