Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Themes with interfaces
Tue, Oct 6 2015 2:22 AMPermanent Link

Christian Kaufmann

Just to be sure before I start the work:

The default font size and borders, heights, margins look like optimized for touch using. For my
application I want to create a more compact layout (smaller fonts, less padding, smaller sizes).

In order to do this I have to copy all relevant .wbi files and adjust the relevant properties one
by one. In addition I have to resize all icons (I want 20x20 not 32x32) I need and replace these in
the icon library.

For a specific item, only one interface (.wbi) is loaded. So I cannot create a TEdit subclass and
define only a different border and font size in the new class interface (TMyEdit.wbi).


cu Christian
Tue, Oct 6 2015 11:11 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Christian,

<< The default font size and borders, heights, margins look like optimized for touch using. For my application I want to create a more compact layout (smaller fonts, less padding, smaller sizes). >>

I'm working on something similar, although it may now be a few weeks before I get it done.

<< In order to do this I have to copy all relevant .wbi files and adjust the relevant properties one by one. In addition I have to resize all icons (I want 20x20 not 32x32) I need and replace these in the icon library. >>

Yes, although you can use a text editor to do global search/replace on things like font names, etc. because the .wbi files are simply JSON files.

<< For a specific item, only one interface (.wbi) is loaded. So I cannot create a TEdit subclass and
define only a different border and font size in the new class interface (TMyEdit.wbi). >>

No, you can most definitely do that.  If you define a TMyEdit class that does nothing but override the GetInterfaceClassName (per my comments about 2.02 not requiring this) and provide a new interface class name, include the interface using the:

{$INTERFACE TMyEdit}

directive, and then add the component to the component library, then any TMyEdit instances will use *your* interface, not the default TEdit interface.

There are essentially two ways of replacing/modifying interfaces:  One is the "make copies, modify compiler search paths", and the other is the "add new control classes and interface file names".   The *only* problem with the latter is that it can cause the size of the HTML loader file to increase because the existing interfaces and new interfaces will *both* be included.

Tim Young
Elevate Software
www.elevatesoft.com
Image