Einzelnen Beitrag anzeigen

BasilBavaria

Registriert seit: 18. Mai 2011
Ort: Niederbayern
22 Beiträge
 
Turbo Delphi für Win32
 
#5

AW: Farbänderung des Formularhintergrundes

  Alt 19. Sep 2013, 08:29
Aufruf der Farbänderung - entspricht Button1Click im vg. Code
Delphi-Quellcode:
procedure TFrmMain.ImageAppOptionsClick(Sender: TObject);
begin
  FrmMainOptions.ShowModal;

  FrmMain.Color := OptFarbe;

// ListBox1.Color := OptMetroFarbe;
// ListBox1.Repaint;
// ListBox1.Refresh
end;
Die Codestrecke fürs ganze Formular

Delphi-Quellcode:
object FrmMain: TFrmMain
  Left = 0
  Top = 0
  BorderStyle = bsNone
  Caption = 'FrmMain'
  ClientHeight = 540
  ClientWidth = 564
  Color = clGray
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWhite
  Font.Height = -13
  Font.Name = 'Microsoft Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  ShowHint = True
  OnCreate = FormCreate
  OnPaint = FormPaint
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 16
  object LabelAppTitel: TLabel
    AlignWithMargins = True
    Left = 10
    Top = 51
    Width = 551
    Height = 37
    Margins.Left = 10
    Margins.Top = 10
    Align = alTop
    Caption = 'Design-Studie'
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWhite
    Font.Height = -32
    Font.Name = 'Microsoft Sans Serif'
    Font.Style = [fsBold]
    ParentFont = False
    ExplicitWidth = 308
  end
  object ListBox1: TListBox
    Left = 32
    Top = 160
    Width = 217
    Height = 129
    BorderStyle = bsNone
    Ctl3D = False
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWhite
    Font.Height = -24
    Font.Name = 'Microsoft Sans Serif'
    Font.Style = [fsBold]
    ItemHeight = 29
    Items.Strings = (
      'Herta Rabiata'
      'Peter Mondfahrt'
      '----Listbox')
    ParentColor = True
    ParentCtl3D = False
    ParentFont = False
    TabOrder = 2
    OnDblClick = ListBox1DblClick
  end
Die Zeiten ändern sich Früher traute ich keinem Computer, den ich nicht mehr tragen kann - heute keinem, den ich nicht mehr sehen kann ...
  Mit Zitat antworten Zitat