MarcoC Posted May 20, 2023 Share Posted May 20, 2023 Hi. I use a TUniGroupBox with AlignmentControl set to uniAlignmentClient and layout set to "table" (with LayoutAttribs.Columns set to 2). Inside that table layout I put two TUnilabels each row, one left aligned, the second right aligned, 50% of the width for each one). So this is my (wanted) layout: -------------------------------------- | Label A | Label B | Despite I set Alignment of Label B to taRightJustify I alway get a left alignment of the text (see screen, right column tunilabels text is still left aligned): I suspect that using a client alignment maybe I have to bypass Unigui and set the style of that label with something like this style:{"float":"right"} Someone can help me to get this? Using Unigui Professional second last available version. Thanks! Marco Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 20, 2023 Share Posted May 20, 2023 Hello, 40 minutes ago, cirirex said: -------------------------------------- | Label A | Label B | One possible solution. 1. UniGroupBox1.LayoutConfig.Cls = customBox 2. LabelB.Alignment = taRightJustify 3. CustomCSS: .customBox label { display: block; } Quote Link to comment Share on other sites More sharing options...
MarcoC Posted May 20, 2023 Author Share Posted May 20, 2023 Hi Sherzod. CustomCSS in ServerModule, right? This is what I get now : And if I just cancel "customBox" from LayoutConfig.Cls: Thanks for your help. Marco Quote Link to comment Share on other sites More sharing options...
MarcoC Posted May 20, 2023 Author Share Posted May 20, 2023 And this if I set labelb.autosize := TRUE, not much better: Thanks Marco Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 20, 2023 Share Posted May 20, 2023 4 minutes ago, cirirex said: CustomCSS in ServerModule, right? Yes. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 20, 2023 Share Posted May 20, 2023 18 minutes ago, Sherzod said: 1. UniGroupBox1.LayoutConfig.Cls = customBox 2. LabelB.Alignment = taRightJustify 3. CustomCSS: .customBox label { display: block; } Quote Link to comment Share on other sites More sharing options...
MarcoC Posted May 20, 2023 Author Share Posted May 20, 2023 Sherzod, I'm missing something. May you please share source code of your demo? Thanks Marco Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 20, 2023 Share Posted May 20, 2023 If possible, make a simple testcase and attach here. I will check. Quote Link to comment Share on other sites More sharing options...
MarcoC Posted May 21, 2023 Author Share Posted May 21, 2023 Thanks Sherzod, if I can't fix it I'll try to send a testcase: in the meaning may you confirm that in your tests you use all my client layout settings (table layout, cols, ecc.) that I'm using, or your project modifies and uses only UniGroupBox1.LayoutConfig.Cls, LabelB.Alignment and CustomCSS to get the right alignment? Marco Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 21, 2023 Share Posted May 21, 2023 1 minute ago, cirirex said: confirm that in your tests you use all my client layout settings (table layout, cols, ecc.) that I'm using Yes, I tried to make the properties the same as in your case. Quote Link to comment Share on other sites More sharing options...
MarcoC Posted May 21, 2023 Author Share Posted May 21, 2023 Thanks Sherzod. Fixed: I had to cancel 50% and 50% for two labels width (layoutconfig) to get the expected right alignments. Marco Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 21, 2023 Share Posted May 21, 2023 Hi, Ok, very good. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.