AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Delphi-PRAXiS - Lounge Delphi-News aus aller Welt Delphi FMX Air.Style Missing 'scrollboxstyle' Definition
Thema durchsuchen
Ansicht
Themen-Optionen

Delphi FMX Air.Style Missing 'scrollboxstyle' Definition

Ein Thema von DP News-Robot · begonnen am 13. Mär 2025
 
Benutzerbild von DP News-Robot
DP News-Robot

Registriert seit: 4. Jun 2010
15.741 Beiträge
 
#1

Delphi FMX Air.Style Missing 'scrollboxstyle' Definition

  Alt 13. Mär 2025, 12:10
I've been upgrading my flagship software product Zilch, from Delphi 5 VCL to Delphi 11 FMX. I'm finally in the report development phase. I'm using the FMX version of FastReports.

Things have been going along quite well, other than the typical stumbling around, which happens when learning the ins and outs of a new component suite (FastReports).

Back in May 2024, I decided to implement a dark theme after watching Ian Barker's presentation called "The fundamental secrets of good UI design". https://www.youtube.com/live/TL2YVio_eTo

During this presentation Barker pleads with the audience to include a dark theme option because it makes life much easier for people like him, who suffer with severe cataracts.

I am very meticulous about my work. Borderline obsessive. After spending nearly 4 weeks creating, tweaking, previewing, re-tweaking a report I finally decided to see what it looks like in dark mode. That's when I got hit with an access violation.


My first reaction was WTF! ?







FMX.StdCtrls
I spent 3 months or more back in May 2024 testing and trying several different FMX styles. I finally settled on the Air.Style after making several customizations. And now this happens. Just when I thought I was getting close to wrapping up this project. WTF! ?

Inside my application I'm using the StyleManager. I call:

TStyleManager.SetStyleFromFile( )

is the full file path of the modified version of Air.Style I'm using inside my program. I remember trying Dark.Style early on but I didn't like the brownish-copper glow effect so I opted for the Air.Style.

I quickly tried setting the to Dark.Style and tested it again, IT WORKED! ?

Okay, so there is something different between Air.Style and Dark.Style. I searched both .STYLE files looking for "TScrollBar".

It turns out that Air.Style is missing the definition for StyleName = 'scrollboxstyle'.

I copied the complete 'scrollboxstyle' definition from Dark.Style and pasted it inside Air.Style and IT WORKED!

Payoff Savings Report - Dark Theme
I'm glad this was a quick fix. Here is the complete 'scrollboxstyle' definition for anyone that would like to modify the Air.Style so it works with FastReports.



object TLayout StyleName = 'scrollboxstyle' DesignVisible = False Height = 131.000000000000000000 Position.X = 254.000000000000000000 Position.Y = 435.000000000000000000 Width = 334.000000000000000000 object TLayout StyleName = 'background' Align = Contents Locked = True Height = 131.000000000000000000 Width = 334.000000000000000000 object TLayout StyleName = 'content' Align = Client Height = 115.000000000000000000 Width = 318.000000000000000000 end object TScrollBar StyleName = 'vscrollbar' Align = Right Height = 115.000000000000000000 Orientation = Vertical Position.X = 318.000000000000000000 Width = 16.000000000000000000 end object TScrollBar StyleName = 'hscrollbar' Align = Bottom Height = 16.000000000000000000 Orientation = Horizontal Position.Y = 115.000000000000000000 Width = 334.000000000000000000 end object TSmallScrollBar StyleName = 'vsmallscrollbar' Align = Right Height = 8.000000000000000000 Orientation = Vertical Margins.Left = 2.000000000000000000 Position.X = 99.000000000000000000 Position.Y = 2.000000000000000000 Visible = False Width = 8.000000000000000000 end object TSmallScrollBar StyleName = 'hsmallscrollbar' Align = Bottom Height = 8.000000000000000000 Orientation = Horizontal Margins.Top = 2.000000000000000000 Position.X = 2.000000000000000000 Position.Y = 113.000000000000000000 Visible = False Width = 150.000000000000000000 end object TLayout Align = Contents Height = 131.000000000000000000 Width = 334.000000000000000000 object TLayout Align = Bottom Height = 20.000000000000000000 Position.Y = 111.000000000000000000 Width = 334.000000000000000000 object TSizeGrip StyleName = 'sizegrip' Align = Right Locked = True Height = 20.000000000000000000 Position.X = 314.000000000000000000 Width = 20.000000000000000000 end end end end end

Enjoy!
Semper Fi
Gunny Mike
https://zilchworks.com












Weiterlesen...
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:36 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