Changeset 10 for trunk/Forms
- Timestamp:
- Jan 25, 2015, 9:54:33 PM (10 years ago)
- Location:
- trunk/Forms
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormPreferences.lfm
r9 r10 21 21 Top = 376 22 22 Width = 75 23 Anchors = [akRight, akBottom] 23 24 Caption = 'Save' 24 25 ModalResult = 1 … … 30 31 Top = 375 31 32 Width = 75 33 Anchors = [akRight, akBottom] 32 34 Caption = 'Cancel' 33 35 ModalResult = 2 34 36 TabOrder = 2 35 37 end 38 object ComboBoxLanguage: TComboBox 39 Left = 192 40 Height = 35 41 Top = 64 42 Width = 292 43 ItemHeight = 0 44 Style = csDropDownList 45 TabOrder = 3 46 end 47 object Label1: TLabel 48 Left = 18 49 Height = 25 50 Top = 65 51 Width = 95 52 Caption = 'Language:' 53 ParentColor = False 54 end 36 55 end -
trunk/Forms/UFormPreferences.pas
r9 r10 16 16 ButtonCancel: TButton; 17 17 CheckBoxRememberDatabase: TCheckBox; 18 ComboBoxLanguage: TComboBox; 19 Label1: TLabel; 18 20 private 19 21 { private declarations } … … 30 32 {$R *.lfm} 31 33 34 uses 35 UCore, ULanguages; 36 32 37 { TFormPreferences } 33 38 … … 35 40 begin 36 41 CheckBoxRememberDatabase.Checked := Preferences.RememberDatabase; 42 Core.CoolTranslator1.LanguageListToStrings(ComboBoxLanguage.Items); 43 ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.CoolTranslator1.Language); 44 if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0; 37 45 end; 38 46 … … 40 48 begin 41 49 Preferences.RememberDatabase := CheckBoxRememberDatabase.Checked; 50 if ComboBoxLanguage.ItemIndex <> -1 then 51 Core.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]); 42 52 end; 43 53
Note:
See TracChangeset
for help on using the changeset viewer.