![]() |
AW: StyleBook nur auf bestimmte Objekte anwenden
AFAIK nur Mobile
|
AW: StyleBook nur auf bestimmte Objekte anwenden
Liste der Anhänge anzeigen (Anzahl: 1)
Wenn's nicht so geht, dann eben umständlich...
Delphi-Quellcode:
So muss ich halt jedes Unterobjekt durchackern. Macht zwar ziemlich Arbeit, aber wer schön sein will muss leiden, oder so.
(o_menu.FindStyleResource('AlternatingRowBackground') as TBrushObject).Brush.Color:= $FF2D2D2D;
(o_menu.FindStyleResource('background') as TRectangle).Fill.Color:= $FF242323; (ListBoxHeader1.FindStyleResource('background') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; (ListBoxItem1.FindStyleResource('background_roundall') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; (ListBoxItem1.FindStyleResource('background_roundbottom') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; (ListBoxItem1.FindStyleResource('background_roundtop') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; (ListBoxItem1.FindStyleResource('background_sharp') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; (ListBoxItem1.FindStyleResource('background_separatorbottom') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; ((ListBoxItem1.FindStyleResource('background_separatorbottom') as TSubImage).FindComponent('subimage1') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; (ListBoxItem2.FindStyleResource('background_roundall') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; (ListBoxItem2.FindStyleResource('background_roundbottom') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; (ListBoxItem2.FindStyleResource('background_roundtop') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; (ListBoxItem2.FindStyleResource('background_sharp') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; (ListBoxItem2.FindStyleResource('background_separatorbottom') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; // ****************** Zugriffsverletzung ******************* // ((ListBoxItem2.FindStyleResource('background_separatorbottom') as TSubImage).FindComponent('subimage1') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; // ********************************************************* // (ListBoxGroupHeader1.FindStyleResource('background') as TSubImage).SourceLookup:= 'iOSJet Retina2style.png'; Nur komm ich an ein Objekt irgendwie nicht dran (im Code oben markiert). Das ist ein unterobjekt vom Seperator-SubImage, auch ein SubImage. Das hat aber weder ein Stylename, noch ein Objektname(?!). Auf dem Bild sieht man den Ausschnitt. Weiß jemand wie ich da ran komme? Viele Grüße Croco EDIT: Habs, über ((ListBoxItem1.FindStyleResource('background_separ atorbottom') as TSubImage).Children kommt man dran |
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:39 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz