Print Page | Close Window

How to add control and text on single lin

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=3359
Printed Date: 09 November 2025 at 11:40pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to add control and text on single lin
Posted By: jigarmehtamscit
Subject: How to add control and text on single lin
Date Posted: 06 December 2005 at 2:14pm
Hi,

I am using task panel in my application. Now i want to add the controls to my task panel dynamically and want also to add the text along with them. I have tried but both comes on different line. My code is as follows..

        CXTPTaskPanelGroup* pGroup3DText = m_wndTaskPanel.AddGroup(IDS_GROUP_3DTEXT);
       
        pGroup3DText->AddTextItem("Text: ");
        pGroup3DText->AddControlItem(m_Text);      //m_Text is editbox

        pGroup3DText->AddTextItem("Font: ");
        pGroup3DText->AddControlItem(m_cbFontface);       //m_cbFontface is combo

I want them to get added on the same line.. So, how to do that ??



-------------
Regards,
Jigar Mehta



Replies:
Posted By: jigarmehtamscit
Date Posted: 06 December 2005 at 2:22pm
Originally posted by jigarmehtamscit jigarmehtamscit wrote:

Hi,

I am using task panel in my application. Now i want to add the controls to my task panel dynamically and want also to add the text along with them. I have tried but both comes on different line. My code is as follows..

        CXTPTaskPanelGroup* pGroup3DText = m_wndTaskPanel.AddGroup(IDS_GROUP_3DTEXT);
       
        pGroup3DText->AddTextItem("Text: ");
        pGroup3DText->AddControlItem(m_Text);      //m_Text is editbox

        pGroup3DText->AddTextItem("Font: ");
        pGroup3DText->AddControlItem(m_cbFontface);       //m_cbFontface is combo

I want them to get added on the same line.. So, how to do that ??



And another problem I am facing in the same context is, My application is having toolbar and menubar and statusbar. I have added the task panel in the dialog. Now, If I use,

    m_wndTaskPanel.SetWindowPos

to resize the dialog according to the current size of the dialog, it overrides the toolbar and menubar. Even I fixed that by giving fixed top and left location but the controls those gets added in the dialog (whose code while adding is shown above) from the first pixel which dont show all of my controls.. So, what to do.. I have attached the snapshot to better describe this..

Please tell me how to solve this problem..

Note : For the snap in the attachment, 3DText is the first taskpanel group which contains controls such as textbox and comboboxes.. but textbox and combo box gets added from the first pixel where menubar is painted.. and that makes controls overriding the menubar/statusbar.



uploads/jigarmehtamscit/2005-12-06_142013_problem.rar - 2005-12-06_142013_problem.rar

-------------
Regards,
Jigar Mehta


Posted By: Fredrik
Date Posted: 18 January 2006 at 8:57am

Did anyone have a solution for this (the question in the first post)? I would also like to add a label to controls on the same line in the task panel.

Perphaps one can solve it by using 'multi columns'? I haven't downloaded 9.81 where this feature was added, but perhaps I should?

Regards,

Fredrik



Posted By: Oleg
Date Posted: 18 January 2006 at 10:33am

Hello,

Solution is to add some dialog and put Edit and Static text to it.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Fredrik
Date Posted: 18 January 2006 at 10:48am

Hi Oleg,

Yes, I know I can use dialogs in the task panel - forgot to mention it in my posting - but would be a bit more convinient to just call, say

pGroup->AddControlItem(m_Text, "Edit: ");   

instead of putting everything into a dialog. Maybe this could be a feature suggestion for a future release?

/ Fredrik


 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net