StatusBar : align and click icon |
Post Reply |
Author | |
Somberlord
Newbie Joined: 30 June 2008 Location: France Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 30 June 2008 at 9:48am |
I would like to add an icon to a pane, align it to left and write text ont the right. And I would also like this icon to be clickable.
I didn't find anything to align the icon to left, and I can't get correct mouse position : I get correct y-position but x-position is between 0 and 20, when my pane is in center of the screen. What can I do?? Thank you for your help |
|
Somberlord
Newbie Joined: 30 June 2008 Location: France Status: Offline Points: 9 |
Post Options
Thanks(0)
|
I have finally make it clickable, but I still don't know how to align it to the left of my pane.
Thanks for help |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Not sure... Icon is always in the left and text on the right...
please attach screenshot.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Somberlord
Newbie Joined: 30 June 2008 Location: France Status: Offline Points: 9 |
Post Options
Thanks(0)
|
Here is screenshot :
And here is my code :
And I can't write text in this pane after. Is there another way to do that? Thank you! |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Replace this code to
CXTPStatusBarPane* pPane = m_wndStatusBar.AddIndicator(ID_INDICATOR_ICON, 0);
pPane->SetText(_T("Text")); pPane->SetIconIndex(IDR_MAINFRAME);
m_wndStatusBar.GetImageManager()->SetIcon(IDR_MAINFRAME, IDR_MAINFRAME); |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Somberlord
Newbie Joined: 30 June 2008 Location: France Status: Offline Points: 9 |
Post Options
Thanks(0)
|
I replaced my code, and it works better than before. But I still have a little problem : text is not in the pane
look : Thanks for your help |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Have to stretch automatically with last version. In older you have manually call
pPane->SetWidth(...);
or
pPane->BestFit();
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Somberlord
Newbie Joined: 30 June 2008 Location: France Status: Offline Points: 9 |
Post Options
Thanks(0)
|
It works !!
Thank you very much !! |
|
Somberlord
Newbie Joined: 30 June 2008 Location: France Status: Offline Points: 9 |
Post Options
Thanks(0)
|
I remember why I love programming. The code was working perfectly a fex hours ago, but BestFit() doesn't work properly anymore (pane is resized to icon width only)
Althought, SetWidth works...but I would prefere to use BestFit if possible... Any idea? Thanks |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
maybe you call BestFit before you set Text. step into BestFit and check if Text has right value.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Somberlord
Newbie Joined: 30 June 2008 Location: France Status: Offline Points: 9 |
Post Options
Thanks(0)
|
When I step into BestFit, Text has right value. here is Two Screenshots :
First, when application executes normally : (its in right-bottom corner of the screen) And here is a screenshot after restore/maximize the window : Seems like the other panes don't move to let enough place to my pane :( |
|
Somberlord
Newbie Joined: 30 June 2008 Location: France Status: Offline Points: 9 |
Post Options
Thanks(0)
|
I resolved my problem by doing that :
But there must be a better way to do.... |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Best way is upgrade to 12.0.1 :-) In last release we totally removed comctrl32 statusbar dependence and draw/calculate statusbar manually.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
qarefi
Newbie Joined: 01 August 2008 Status: Offline Points: 1 |
Post Options
Thanks(0)
|
Hello, I am for Argentina.
Can you send me the code for make it clickable the statusbar ?
Thanks in advance.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Please check our sample first - Samples\CommandBars\StatusBar
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |