![]() |
StatusBar : align and click icon |
Post Reply
|
| Author | |
Somberlord
Newbie
Joined: 30 June 2008 Location: France Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Topic: StatusBar : align and click iconPosted: 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)
Quote Reply
Posted: 01 July 2008 at 4:38am |
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 July 2008 at 1:17pm |
|
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)
Quote Reply
Posted: 02 July 2008 at 4:31am |
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 July 2008 at 9:45am |
|
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)
Quote Reply
Posted: 02 July 2008 at 10:51am |
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 02 July 2008 at 2:37pm |
|
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)
Quote Reply
Posted: 03 July 2008 at 4:20am |
|
It works !!
Thank you very much !! |
|
![]() |
|
Somberlord
Newbie
Joined: 30 June 2008 Location: France Status: Offline Points: 9 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 July 2008 at 10:05am |
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 July 2008 at 3:23pm |
|
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)
Quote Reply
Posted: 04 July 2008 at 6:25am |
|
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)
Quote Reply
Posted: 04 July 2008 at 8:54am |
|
I resolved my problem by doing that :
But there must be a better way to do.... |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 July 2008 at 12:12pm |
|
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)
Quote Reply
Posted: 01 August 2008 at 11:00am |
|
Hello, I am for Argentina.
Can you send me the code for make it clickable the statusbar ?
Thanks in advance.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 August 2008 at 4:25am |
|
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 |