when trying to assign skin name to viewstyle, I am getting an AV error.
Code is written according to the help file, see help on TdxCustomNavbar.ViewStyle
Used to work in the previous version
Steps to Reproduce:
Here is my code:
procedure CopyObject(Source, Dest: TObject; isWA: Boolean = True);
begin
if Assigned(Dest) then
begin
TdxNavBar(Dest).View := dxNavBarSkinExplorerBarView;
if isWA then
TdxNavBarSkinNavPanePainter(TdxNavBar(Dest).ViewStyle).SkinName := 'Office2007Blue'
else
TdxNavBarSkinNavPanePainter(TdxNavBar(Dest).ViewStyle).SkinName := 'Silver';
TdxNavBarSkinNavPanePainter(TdxNavBar(Dest).ViewStyle).SkinNameAssigned := True;
end;
…
Actual Results:
See attachemnt
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi David,
The "How to Apply Skins in the Application" help topic shows a code example for a TdxNavBar control, if the NavBarSkinNavigatorPaneView is applied to its View property (dxNavBar1.View := dxNavBarSkinNavigatorPaneView). If you're applying the NavBarSkinExplorerBarView, you have to use the TdxNavBarSkinExplorerBarPainter instead:
if isWA then TdxNavBarSkinExplorerBarPainter(TdxNavBar(Dest).ViewStyle).SkinName := 'Office2007Blue' else TdxNavBarSkinExplorerBarPainter(TdxNavBar(Dest).ViewStyle).SkinName := 'Silver'; TdxNavBarSkinExplorerBarPainter(TdxNavBar(Dest).ViewStyle).SkinNameAssigned := True;
Thanks,
Alex
Thank you very much for the quick and accurate answer. It works.
However, you need to make some changes to the help file concerning the example brought on TdxCustomNavbar.ViewStyle
David
Hi David,
Thank you for informing us that the problem is resolved. Please feel free to contact us in case of any difficulty. We are happy to help you at any time.
As for changes to the help topic, the code example in this topic is for the SkinNavigationPaneView only. Do you suggest adding a code example for the SkinExplorerBarView?
Thanks,
Alex