Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to add control and text on single lin
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to add control and text on single lin

 Post Reply Post Reply
Author
Message
jigarmehtamscit View Drop Down
Groupie
Groupie
Avatar

Joined: 29 October 2005
Location: India
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote jigarmehtamscit Quote  Post ReplyReply Direct Link To This Post Topic: How to add control and text on single lin
    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
Back to Top
jigarmehtamscit View Drop Down
Groupie
Groupie
Avatar

Joined: 29 October 2005
Location: India
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote jigarmehtamscit Quote  Post ReplyReply Direct Link To This Post 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.



2005-12-06_142013_problem.rar
Regards,
Jigar Mehta
Back to Top
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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: 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
Back to Top
Fredrik View Drop Down
Senior Member
Senior Member


Joined: 22 June 2005
Status: Offline
Points: 235
Post Options Post Options   Thanks (0) Thanks(0)   Quote Fredrik Quote  Post ReplyReply Direct Link To This Post 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


 

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.047 seconds.