Change OutlookBar Color at runtime
#1
Posted 13 October 2007 - 07:53 PM
How do I change the color of OutlookBar.Items[x] at runtime?
Thanks,
CM
#2
Posted 13 October 2007 - 07:57 PM
Use next code:
But first set AdaptiveColors to False;
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#3
Posted 13 October 2007 - 08:10 PM
I just missed out the AdaptiveColors part.
Can you explain a bit what is the purpose of AdaptiveColor?
Also I want to set it the same color as we manually click the OutlookBar item. Can you tell me what is that color?
Thanks,
CM
#4
Posted 13 October 2007 - 08:37 PM
When AdaptiveColors property is set to True, colors are used from current color scheme (Blue, Black, Silver), and Item's color property is ignored.
If you think about Selection color, it is taken from color's scheme too, but if needed I will add a property SelectionColor.
Reminder: Color scheme may be set with using TNxColorScheme component (Next Suite tab/category in Delphi).
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#5
Posted 16 October 2007 - 06:41 AM
I have tried TNxColorScheme component but I cannot get it to work the way I wanted.
What I want to do is similar to your OutlookBar in MainDemo.
I want to mimic the OutlookBar behavior as if user has manually click on it (change color from blue to orange color).
I have successfully open the OutlookBar page using ActivePage but I cannot change its OutlookBar color to be selected color.
Thanks,
CM
#6
Posted 16 October 2007 - 10:20 AM
I am not sure that I understand
Color of selected item can't be changed at the moment, but I may add property named SelectionColor. This property will work only if property AdaptiveColors = False.
If you can give me more details, this will be great.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#7
Posted 16 October 2007 - 11:26 AM
Here is the details of what I want to do:
My application mimic your MainDemo style where on the left panel I have OutlookBar navigation menu and right panel is the actual page. I have 3 items in my OutlookBar: Customer, Vendor, and System Configuration. When the system detected user first login, the system will open the "Change Password" page under System Configuration OutlookBar. Currently, I managed to open the System Configuration OutlookBar using ActivePage command. But I also want to change System Configuration OutlookBar color to show user this is the current select bar. How to do this? I can use the Items[x].Color you gave earlier, but then what is the color to set as if we click on the OutlookBar manually? When I try your MainDemo, the selected color is Orange color.
Thanks,
Chee
#8
Posted 16 October 2007 - 11:34 AM
Do you think about setting ItemIndex property?
Setting this property will "activate" button with this index inside OutlookBar. I hope that this helps.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#9
Posted 16 October 2007 - 11:51 AM
Thanks a lot.
regards,
Chee
#10
Posted 16 October 2007 - 01:42 PM
Is there something like ItemIndex in NxLinkLabel?
I want to show a LinkLabel in its selected mode (by changing its font color or draw rectangle around the LinkLabel)
Thanks,
Chee
#11
Posted 16 October 2007 - 06:18 PM
Unfortunatelly not. There is a ImageIndex
If you need some specific needs, maybe you can describe it in more details to I propose you some other solution.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#12
Posted 16 October 2007 - 06:35 PM
What I want to do is to show user which NxLinkLabel is currently being SELECTED (something like changing LinkLabel font color or drawing rectangle around LinkLabel).
Thank,
Chee
#13
Posted 16 October 2007 - 07:08 PM
This may be done with using standard OnEnter and OnExit events (most every component in delphi have it).
Here is a small example:
begin
NxLinkLabel1.Font.Color := clRed;
NxLinkLabel1.Font.Style := [fsBold, fsItalic];
end;
procedure TForm1.NxLinkLabel1Exit(Sender: TObject);
begin
NxLinkLabel1.Font.Color := clBtnText;
NxLinkLabel1.Font.Style := [];
end;
I hope that it helps,
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











