Tässä tiedostossa on värin vaihtamiseksi turhaan kirjoitettu koodi. Siitähän selvittiin sikamaisella typecastilla, jolla controllin vari tuotiin julkiseksi. Vesa 26.8.1996 {$ifdef KAIKKI} ,DBGrids,DBLookup,FileCtrl,Grids,ComCtrls,Mask,Outline,Buttons {$endif} (* if ( comp is TForm ) then Result := (comp as TForm ).Color; if ( comp is TDBEdit ) then Result := (comp as TDBEdit ).Color; if ( comp is TEdit ) then Result := (comp as TEdit ).Color; if ( comp is TPanel ) then Result := (comp as TPanel ).Color; if ( comp is TLabel ) then Result := (comp as TLabel ).Color; if ( comp is TCheckBox ) then Result := (comp as TCheckBox ).Color; if ( comp is TGroupBox ) then Result := (comp as TGroupBox ).Color; if ( comp is TRadioButton ) then Result := (comp as TRadioButton ).Color; {$ifdef KAIKKI} if ( comp is TComboBox ) then Result := (comp as TComboBox ).Color; if ( comp is TDBCheckBox ) then Result := (comp as TDBCheckBox ).Color; if ( comp is TDBComboBox ) then Result := (comp as TDBComboBox ).Color; if ( comp is TDBGrid ) then Result := (comp as TDBGrid ).Color; if ( comp is TDBImage ) then Result := (comp as TDBImage ).Color; if ( comp is TDBListBox ) then Result := (comp as TDBListBox ).Color; if ( comp is TDBLookupCombo ) then Result := (comp as TDBLookupCombo ).Color; if ( comp is TDBLookupList ) then Result := (comp as TDBLookupList ).Color; if ( comp is TDBMemo ) then Result := (comp as TDBMemo ).Color; if ( comp is TDBRadioGroup ) then Result := (comp as TDBRadioGroup ).Color; if ( comp is TDBText ) then Result := (comp as TDBText ).Color; if ( comp is TDirectoryListBox ) then Result := (comp as TDirectoryListBox).Color; if ( comp is TDrawGrid ) then Result := (comp as TDrawGrid ).Color; if ( comp is TDriveComboBox ) then Result := (comp as TDriveComboBox ).Color; if ( comp is TFileListBox ) then Result := (comp as TFileListBox ).Color; if ( comp is TListBox ) then Result := (comp as TListBox ).Color; if ( comp is TListView ) then Result := (comp as TListView ).Color; if ( comp is TMaskEdit ) then Result := (comp as TMaskEdit ).Color; if ( comp is TMemo ) then Result := (comp as TMemo ).Color; if ( comp is TNotebook ) then Result := (comp as TNotebook ).Color; if ( comp is TOutline ) then Result := (comp as TOutline ).Color; if ( comp is TPaintBox ) then Result := (comp as TPaintBox ).Color; { if ( comp is TPageControl ) then Result := (comp as TPageControl ).Color;} if ( comp is TRichEdit ) then Result := (comp as TRichEdit ).Color; if ( comp is TScrollBox ) then Result := (comp as TScrollBox ).Color; if ( comp is TStringGrid ) then Result := (comp as TStringGrid ).Color; if ( comp is TTextAttributes ) then Result := (comp as TTextAttributes ).Color; if ( comp is TTreeView ) then Result := (comp as TTreeView ).Color; { if ( comp is TBitBtn ) then Result := (comp as TBitBtn ).Color;} {$endif} *) (* { Nyt vaihtaminen pitäisi onnistua, koska väri pystyttiin lukemaan } if ( comp is TForm ) then (comp as TForm ).Color := color; if ( comp is TDBEdit ) then (comp as TDBEdit ).Color := color; if ( comp is TEdit ) then (comp as TEdit ).Color := color; if ( comp is TPanel ) then (comp as TPanel ).Color := color; if ( comp is TLabel ) then (comp as TLabel ).Color := color; if ( comp is TCheckBox ) then (comp as TCheckBox ).Color := color; if ( comp is TGroupBox ) then (comp as TGroupBox ).Color := color; if ( comp is TRadioButton ) then (comp as TRadioButton ).Color := color; {$ifdef KAIKKI} if ( comp is TComboBox ) then (comp as TComboBox ).Color := color; if ( comp is TDBCheckBox ) then (comp as TDBCheckBox ).Color := color; if ( comp is TDBComboBox ) then (comp as TDBComboBox ).Color := color; if ( comp is TDBGrid ) then (comp as TDBGrid ).Color := color; if ( comp is TDBImage ) then (comp as TDBImage ).Color := color; if ( comp is TDBListBox ) then (comp as TDBListBox ).Color := color; if ( comp is TDBLookupCombo ) then (comp as TDBLookupCombo ).Color := color; if ( comp is TDBLookupList ) then (comp as TDBLookupList ).Color := color; if ( comp is TDBMemo ) then (comp as TDBMemo ).Color := color; if ( comp is TDBRadioGroup ) then (comp as TDBRadioGroup ).Color := color; if ( comp is TDBText ) then (comp as TDBText ).Color := color; if ( comp is TDirectoryListBox ) then (comp as TDirectoryListBox).Color := color; if ( comp is TDrawGrid ) then (comp as TDrawGrid ).Color := color; if ( comp is TDriveComboBox ) then (comp as TDriveComboBox ).Color := color; if ( comp is TFileListBox ) then (comp as TFileListBox ).Color := color; if ( comp is TListBox ) then (comp as TListBox ).Color := color; if ( comp is TListView ) then (comp as TListView ).Color := color; if ( comp is TMaskEdit ) then (comp as TMaskEdit ).Color := color; if ( comp is TMemo ) then (comp as TMemo ).Color := color; if ( comp is TNotebook ) then (comp as TNotebook ).Color := color; if ( comp is TOutline ) then (comp as TOutline ).Color := color; if ( comp is TPaintBox ) then (comp as TPaintBox ).Color := color; { if ( comp is TPageControl ) then (comp as TPageControl ).Color := color} if ( comp is TRichEdit ) then (comp as TRichEdit ).Color := color; if ( comp is TScrollBox ) then (comp as TScrollBox ).Color := color; if ( comp is TStringGrid ) then (comp as TStringGrid ).Color := color; if ( comp is TTextAttributes ) then (comp as TTextAttributes ).Color := color; if ( comp is TTreeView ) then (comp as TTreeView ).Color := color; { if ( comp is TBitBtn ) then (comp as TBitBtn ).Color := color;} {$endif} *)