Labelled Edit-Controls in RibbonBar aligned ?
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=12483
Printed Date: 01 May 2025 at 5:19am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Labelled Edit-Controls in RibbonBar aligned ?
Posted By: cpehonk
Subject: Labelled Edit-Controls in RibbonBar aligned ?
Date Posted: 19 October 2008 at 10:56am
Hi !
It's me again ... 
How can I align CXTPControlEdit controls in a RibbonBar group with different labels ? I would like to have the edit controls itself with the same width und left aligned. Like in this example:
But this is achieved by adding numerous spaces at the end of a label to align them. There must be a more elegant solution !
I tried "SetLabelWidth()" but I did not get it to work.
Any hints ?
Greetings,
Chris
|
Replies:
Posted By: Oleg
Date Posted: 20 October 2008 at 7:01am
Hi,
afraid there is no more elegant solution :-(
We will add something.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: cpehonk
Date Posted: 20 October 2008 at 8:51am
Thanks, Oleg.
Please, keep me informed about what you'll add.
|
Posted By: DavidH
Date Posted: 30 July 2009 at 9:25am
I'm having the same problem.
Is there any solution yet?
David.
|
Posted By: DavidH
Date Posted: 02 September 2009 at 7:27am
Dear CodeJock team,
I'm trying to work out how to fix this but it would have been easier if more of the CXTPControlEdit methods were virtual. I do this by inheriting from CXTPControlEdit, and because of the lack of virtual methods, CXTPRibbonTheme. I really don't want to change your source code, as it will make any upgrade later very tricky. Anyway, I'm only halfway done, and feeling a bit uneasy about it.
Are you intending to fix this in an upcoming release? If so, I'd really like to know as it will save me a mountain of work. Also, I'm sure that your solution will be better.
Best regards from a satisfied customer,
David.
|
Posted By: Oleg
Date Posted: 02 September 2009 at 1:24pm
Hi,
yes, we going to fix it, do you have suggestion how to make it more smart. SetLabelWidth is not really good solution, because it depends on selected font.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: DavidH
Date Posted: 02 September 2009 at 2:02pm
Hi Oleg,
First, thanks for replying.
The easiest way in my case would probably be to be able to set the minimum width for the 'edit' area of a CXTPControlEdit.
Then, if there are multiple CXTPControlEdits in a column, CodeJock should find the greatest minimum width, and the greatest labelWidth. Add the two to get the overall column width. All this maybe under a 'xtpLineUp' flag for the items in a column?
I'd really like this MinimumEditWidth, as I have multiple language versions, so the label text varies wildly in length.
Alternatively, just a 'xtpLineUp' flag would be OK, where CodeJock simply uses the max labelWidth of the labels in the column.
Of course, I have not thought through all the details with RtL languages etc. That might spoil the fun a bit.
Thanks again,
David.
P.S. Currently, the SetLabelWidth is somewhat misleading, as it's always called by the framework itself just before drawing. So using this method has no effect at all for the library user. While you're at it, you might want to standardize on terminology in the code for 'Label' and 'Caption' for edit controls.
|
Posted By: Oleg
Date Posted: 03 September 2009 at 6:47am
ok, thanks, checking what to do best :)
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: Satyen
Date Posted: 27 July 2010 at 7:14am
Hello Oleg,
Is there any progress on this problem.
I am also facing similar issue wherein two edit boxes and a spinner control (all placed one below another and having labels) are messed up. There alignment is wrong for different locales. Further, the label is overriding control in front of it.
Regards,
Satyen.
|
|