Wednesday, July 27, 2022

Choose framework to make your application look modern

Our main apps UI have got some critics. It looks old and boring. I can can just agree. Indeed it looks boring with Delphis default color scheme grey, black and white. None in the team have any graphical talent. We simple prioritize features more than appearance. 

But to change that I try to investigate the best way to enhance UI. The app use Developer Express components for grids, textedits, comboboxes etc. But also standard VCL components at some places. So in other words. We want a general way to apply a style on both VCL and Devexpress components. I evaluated VCL Styles and DevExpress Skins. 

  • Come with Delphi. No dependency to third party components
  • There is a separate application Bitmap Style Designer that generate a style file.
  • Only one style can be used at a time per application. But possible to change style in runtime if several styles are included. 
  • Possible to make exception and not style a certain component
  • If component is created in runtime it must have an owner or style don't work
  • VCL styles are limited to standard VCL components like TForm, TButton, TEdit, TCombobox etc. Some are used in Attracs, but most are replaced by DevExpress components (This is biggest drawback)

  • Commercial package
  • Special adapting unit (unfortunately only available for registered users) to support VCL Styles in DevExpress controls. As Devexpress components is used this framework would be mandatory if VCL Styles would be used.

  • DevExpress had it own styles, they call it skins. This is built in another way than VCL Styles.
  • Skins are a bit more flexible than VCL Styles. I can apply one skin to whole application, a form or a single component.
  • Skins can be used both for Devexpress components and VCL components. This is very important for us.
  • I can also preview skin directly in designtime. With VCL Styles you have to run the application for that. Or see a sample in bitmap editor.
  • Beside bitmap skins there is vector skins. This is good for high resolution monitors as it never be pixelated when scale up.
  • There is also a skin editor that look more polished than builtin Bitmap Style Designer.
  • Change skin in runtime feels faster than change VCL Style.
  • To generate an own custom skin is a bit more complicated. Often an existing skin is used as template like VCL Styles. A modified copy is then used. A new delphi source is generated from Skin Editor. That is then references in Application uses.

To summarize. VCL Styles works fine. But DevExpress skins is better in most ways. Better performance, more flexibility and more polished in my opinion. If you can afford it, DevExpress is really the best choice.