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 previous 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

 
Read Message
Read Message
Read Message
Read Message
Read Message
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: Thu May 09 18:50:43 CEST 2024

Total time taken to generate the page: 0.02163 seconds