Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   StyleBook nur auf bestimmte Objekte anwenden (https://www.delphipraxis.net/175380-stylebook-nur-auf-bestimmte-objekte-anwenden.html)

Crocotronic 21. Jun 2013 16:59

AW: StyleBook nur auf bestimmte Objekte anwenden
 
AFAIK nur Mobile

Crocotronic 28. Jun 2013 15:01

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:
 (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';
So muss ich halt jedes Unterobjekt durchackern. Macht zwar ziemlich Arbeit, aber wer schön sein will muss leiden, oder so.

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.
Seite 2 von 2     12   

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