Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Labelled Edit-Controls in RibbonBar aligned ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Labelled Edit-Controls in RibbonBar aligned ?

 Post Reply Post Reply
Author
Message
cpehonk View Drop Down
Groupie
Groupie


Joined: 27 April 2008
Location: Germany
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpehonk Quote  Post ReplyReply Direct Link To This Post Topic: Labelled Edit-Controls in RibbonBar aligned ?
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
cpehonk View Drop Down
Groupie
Groupie


Joined: 27 April 2008
Location: Germany
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote cpehonk Quote  Post ReplyReply Direct Link To This Post Posted: 20 October 2008 at 8:51am
Thanks, Oleg.
 
Please, keep me informed about what you'll add.
 
Back to Top
DavidH View Drop Down
Groupie
Groupie


Joined: 24 March 2007
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote DavidH Quote  Post ReplyReply Direct Link To This Post Posted: 30 July 2009 at 9:25am
I'm having the same problem.

Is there any solution yet?

David.
Back to Top
DavidH View Drop Down
Groupie
Groupie


Joined: 24 March 2007
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote DavidH Quote  Post ReplyReply Direct Link To This Post 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.


Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
DavidH View Drop Down
Groupie
Groupie


Joined: 24 March 2007
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote DavidH Quote  Post ReplyReply Direct Link To This Post 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.



Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 03 September 2009 at 6:47am

ok, thanks, checking what to do best :)

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Satyen View Drop Down
Groupie
Groupie
Avatar

Joined: 22 December 2008
Location: India
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote Satyen Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.