Profile Picture

NLabel Dock vs ContentAlignment

Posted By Ereona 13 Years Ago
Author
Message
Ereona
Posted 13 Years Ago
View Quick Profile
Forum Member

Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 43, Visits: 1
It seems that if I set NLabel's Dock to DockStyle.Bottom or DockStyle.Top, ContentAlignment not works. You can see it even in Examples/Panels/Labels/General: the m_Footer has ContentAlignment MiddleLeft, but appears in the center. The question is following: how to use Dock and ContentAlignment together? I need a Label that will appear in the lower right corner and will use the DockPanel behavior.

Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 2 days ago @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hi Ereona,

You have to use FitAlignment - ContentAlignment is used only when the label is using it's Location property in order to position the label relative to location. Let us know if you meet any problems.



Best Regards,
Nevron Support Team



Ereona
Posted 13 Years Ago
View Quick Profile
Forum Member

Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 43, Visits: 1
Thanks, I use FitAlignment successfully.
I have one more question. I set FitAlignment to MiddleRight. But if the label's text has more than one rows, the horizontal text alignment is center. But I need the right text alignment. How to do it?
UPDATE:
I have done it througth TextStyle.StringFormatStyle.HorzAlign.

Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 2 days ago @ 1:54 AM
Posts: 3,054, Visits: 4,009

Hi Ereona,

"UPDATE:I have done it througth TextStyle.StringFormatStyle.HorzAlign." - yes that's the right way - did you meet any problems?



Best Regards,
Nevron Support Team



Ereona
Posted 13 Years Ago
View Quick Profile
Forum Member

Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 43, Visits: 1
No problems already, thank you



Similar Topics


Reading This Topic