-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUnit1_1.inc
174 lines (169 loc) · 10.1 KB
/
Unit1_1.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
{ KOL MCK } // Do not remove this line!
procedure NewFMain( var Result: PFMain; AParent: PControl );
begin
{$IFDEF KOLCLASSES}
Result := PFMain.Create;
{$ELSE OBJECTS}
New( Result, Create );
{$ENDIF KOL CLASSES/OBJECTS}
Result.Form := NewForm( AParent, 'KBBI' ).SetPosition( 505, 178 ).Tabulate;
Applet := Result.Form;
Result.Form.Add2AutoFree( Result );
Result.Form.SetClientSize( 569, 393 );
Result.Form.Font.FontHeight := 14;
Result.Form.Font.FontName := 'Arial';
Result.Form.Border := 0;
Result.Form.MinWidth := 580;
Result.Form.MinHeight := 400;
Result.Form.KeyPreview := TRUE;
Result.Form.OnClose := Result.KOLForm1Close;
Result.Form.OnKeyUp := Result.KOLForm1KeyUp;
Result.Form.OnResize := Result.KOLForm1Resize;
Result.Form.OnShow := Result.KOLForm1Show;
Result.Thread1 := NewThreadAutoFree( nil );
Result.Thread1.OnExecute := Result.Thread1Execute;
Result.PanelTop := NewPanel( Result.Form, esNone ).SetAlign ( caTop ).SetSize( 0, 93 ).SetBorder( 0);
Result.PanelTop.Color := TColor(clBtnFace);
Result.Label1 := NewLabel( Result.PanelTop, 'Lema' ).SetPosition( 44, 36 ).AutoSize( TRUE ).SetBorder( 2);
Result.Label2 := NewLabel( Result.PanelTop, 'Arti (Kalimat)' ).SetPosition( 8, 63 ).AutoSize( TRUE ).SetBorder( 2);
Result.LabelEffect1 := NewLabelEffect( Result.PanelTop, 'Kamus Besar Bahasa Indonesia', 1 ).SetPosition( 8, 8 ).AutoSize( TRUE ).SetBorder( 2);
Result.LabelEffect1.Ctl3D := False;
Result.LabelEffect1.HasBorder := FALSE;
Result.LabelEffect1.Font.FontStyle := [ fsBold ];
Result.LabelEffect1.Font.FontHeight := 16;
Result.LabelEffect1.TextAlign := KOL.taLeft;
Result.LabelEffect1.Transparent := True;
Result.LabelEffect1.Color := TColor(clBtnFace);
Result.LabelEffect1.Color2 := TColor(clWhite);
Result.cbKriteria := NewComboBox( Result.PanelTop, [ coReadOnly, coNoIntegralHeight ] ).SetPosition( 76, 32 ).SetSize( 77, 0 ).SetBorder( 2);
Result.cbKriteria.Color := TColor(clWindow);
Result.ebCari := NewEditBox( Result.PanelTop, [ ] ).SetPosition( 160, 32 ).SetSize( 256, 0 ).SetBorder( 2);
Result.ebCari.Font.FontHeight := 16;
Result.btnCariKata := NewButton( Result.PanelTop, 'Cari' ).SetPosition( 417, 31 ).SetSize( 53, 0 ).SetBorder( 2);
Result.chTepatSama := NewCheckBox( Result.PanelTop, 'Huruf sama' ).SetPosition( 76, 60 ).SetBorder( 2);
Result.ebKalimat := NewEditBox( Result.PanelTop, [ ] ).SetPosition( 160, 59 ).SetSize( 256, 0 ).SetBorder( 2);
Result.ebKalimat.Font.FontHeight := 16;
Result.btnCariArti := NewButton( Result.PanelTop, 'Cari' ).SetPosition( 417, 59 ).SetSize( 53, 0 ).SetBorder( 2);
Result.btnSetting := NewButton( Result.PanelTop, '...' ).SetPosition( 488, 31 ).SetSize( 32, 0 ).SetBorder( 2);
Result.btnSetting.Font.FontStyle := [ fsBold ];
{$IFDEF USE_MHTOOLTIP}
Result.btnSetting.Hint.Text := 'Buka menu Pengaturan';
{$ENDIF USE_MHTOOLTIP}
Result.btnAbout := NewButton( Result.PanelTop, '!' ).SetPosition( 524, 31 ).SetSize( 32, 0 ).SetBorder( 1);
Result.btnAbout.Font.FontHeight := 16;
{$IFDEF USE_MHTOOLTIP}
Result.btnAbout.Hint.Text := 'Tentang Program';
{$ENDIF USE_MHTOOLTIP}
Result.btnHelp := NewButton( Result.PanelTop, '?' ).SetPosition( 524, 55 ).SetSize( 32, 0 ).SetBorder( 1);
Result.btnHelp.Font.FontHeight := 16;
{$IFDEF USE_MHTOOLTIP}
Result.btnHelp.Hint.Text := 'Tentang Program';
{$ENDIF USE_MHTOOLTIP}
Result.btnRandom := NewButton( Result.PanelTop, 'Rnd' ).SetPosition( 488, 56 ).SetSize( 32, 0 ).SetBorder( 2);
Result.Panel1 := NewPanel( Result.Form, esNone ).SetAlign ( caBottom ).SetSize( 0, 20 ).SetBorder( 0);
Result.LblEf1 := NewLabelEffect( Result.Panel1, 'http://ebsoft.web.id', 1 ).SetPosition( 5, 2 ).AutoSize( TRUE ).SetBorder( 2);
Result.LblEf1.Ctl3D := False;
Result.LblEf1.HasBorder := FALSE;
Result.LblEf1.Font.Color := TColor($35271A);
Result.LblEf1.TextAlign := KOL.taLeft;
Result.LblEf1.Transparent := True;
Result.LblEf1.Color := TColor($CEB195);
Result.LblEf1.Color2 := TColor($E9DCCF);
Result.LblEf2 := NewLabelEffect( Result.Panel1, 'http://ebsoft.web.id', 1 ).SetPosition( 109, 2 ).AutoSize( TRUE ).SetBorder( 2);
Result.LblEf2.Ctl3D := False;
Result.LblEf2.HasBorder := FALSE;
Result.LblEf2.Font.Color := TColor(clBlue);
Result.LblEf2.Font.FontStyle := [ fsBold ];
Result.LblEf2.TextAlign := KOL.taLeft;
Result.LblEf2.Cursor := LoadCursor( 0, IDC_HAND );
Result.LblEf2.Transparent := True;
Result.LblEf2.Color := TColor($CEB195);
Result.LblEf2.Color2 := TColor(clWhite);
Result.PanelMain := NewPanel( Result.Form, esNone ).SetAlign ( caClient ).SetBorder( 1);
Result.PanelMain.Color := TColor($F4EEEA);
Result.PanelDef := NewPanel( Result.PanelMain, esNone ).SetAlign ( caClient ).SetBorder( 1);
Result.PanelDef.Color := TColor(clBtnFace);
Result.REdef := NewRichEdit( Result.PanelDef, [ eoMultiline, eoNoHScroll, eoReadonly ] ).SetAlign ( caClient ).SetBorder( 2);
Result.REdef.HasBorder := FALSE;
Result.REdef.RE_CharFmtArea := raAll;
Result.REdef.RE_Font.FontHeight := 16;
Result.REdef.RE_CharFmtArea := raSelection;
Result.REdef.DoubleBuffered := True;
Result.PanelWord := NewPanel( Result.PanelMain, esNone ).SetAlign ( caLeft ).SetSize( 148, 0 ).SetBorder( 1);
Result.PanelWord.Color := TColor(clBtnFace);
Result.PnlTop := NewPanel( Result.PanelWord, esNone ).SetAlign ( caTop ).SetSize( 0, 165 ).SetBorder( 0);
Result.PnlPageTop := NewPanel( Result.PnlTop, esNone ).SetAlign ( caTop ).SetSize( 0, 20 ).SetBorder( 0);
Result.PnlPageTop.Visible := False;
Result.PnlPageTop.Color := TColor(clBtnFace);
Result.lblMain := NewLabel( Result.PnlPageTop, 'Main word' ).SetAlign ( caClient ).SetBorder( 2);
Result.lblMain.Font.FontStyle := [ fsItalic ];
Result.lblMain.VerticalAlign := KOL.vaCenter;
Result.btnNext1 := NewButton( Result.PnlPageTop, '>' ).SetAlign ( caRight ).AutoSize( TRUE ).SetBorder( 2);
Result.btnPrev1 := NewButton( Result.PnlPageTop, '<' ).SetAlign ( caRight ).AutoSize( TRUE ).SetBorder( 2);
Result.lbKata := NewListBox( Result.PnlTop, [ loNoExtendSel, loNoIntegralHeight ] ).SetAlign ( caClient ).SetBorder( 2);
Result.lbKata.HasBorder := FALSE;
Result.lbKata.Font.FontHeight := 16;
Result.lbKata.DoubleBuffered := True;
Result.lbKata.Color := TColor(clWindow);
Result.Splitter1 := NewSplitter( Result.PanelWord, 0, 0 ).SetAlign ( caTop ).SetBorder( 2);
Result.PnlBottom := NewPanel( Result.PanelWord, esNone ).SetAlign ( caClient ).SetBorder( 0);
Result.PnlBottom.Font.FontHeight := 16;
Result.PnlPageBottom := NewPanel( Result.PnlBottom, esNone ).SetAlign ( caTop ).SetSize( 0, 20 ).SetBorder( 0);
Result.PnlPageBottom.Visible := False;
Result.PnlPageBottom.Color := TColor(clBtnFace);
Result.lblAdd := NewLabel( Result.PnlPageBottom, 'Memuat' ).SetAlign ( caClient ).SetBorder( 2);
Result.lblAdd.Font.FontStyle := [ fsItalic ];
Result.lblAdd.Font.FontHeight := 14;
Result.lblAdd.VerticalAlign := KOL.vaCenter;
Result.btnNext2 := NewButton( Result.PnlPageBottom, '>' ).SetAlign ( caRight ).AutoSize( TRUE ).SetBorder( 2);
Result.btnPrev2 := NewButton( Result.PnlPageBottom, '<' ).SetAlign ( caRight ).AutoSize( TRUE ).SetBorder( 2);
Result.lbAdd := NewListBox( Result.PnlBottom, [ loNoExtendSel, loNoIntegralHeight ] ).SetAlign ( caClient ).SetBorder( 2);
Result.lbAdd.HasBorder := FALSE;
Result.lbAdd.DoubleBuffered := True;
Result.lbAdd.Color := TColor(clWindow);
Result.Splitter4 := NewSplitterEx( Result.PanelMain, 0, 0, esNone ).SetAlign ( caLeft ).SetSize( 3, 0 ).SetBorder( 2);
Result.Splitter4.Color := TColor(clBtnFace);
Result.ebCari.Color := TColor(clWindow);
Result.ebCari.OnKeyUp := Result.ebCariKeyUp;
Result.ebCari.OnChange := Result.ebCariChange;
Result.btnAbout.OnClick := Result.btnAboutClick;
Result.btnAbout.Anchor(FALSE, FALSE, TRUE, FALSE);
Result.cbKriteria.OnKeyDown := Result.cbKriteriaKeyDown;
Result.cbKriteria.OnChange := Result.cbKriteriaChange;
Result.btnCariKata.OnClick := Result.btnCariKataClick;
Result.btnSetting.OnClick := Result.btnSettingClick;
Result.btnSetting.Anchor(FALSE, FALSE, TRUE, FALSE);
Result.ebKalimat.Color := TColor(clWindow);
Result.ebKalimat.OnKeyUp := Result.ebKalimatKeyUp;
Result.chTepatSama.OnClick := Result.chTepatSamaClick;
Result.btnCariArti.OnClick := Result.btnCariArtiClick;
Result.btnHelp.OnClick := Result.btnHelpClick;
Result.btnHelp.Anchor(FALSE, FALSE, TRUE, FALSE);
Result.btnRandom.OnClick := Result.btnRandomClick;
Result.btnRandom.Anchor(FALSE, FALSE, TRUE, FALSE);
Result.PanelMain.Anchor(TRUE, TRUE, TRUE, TRUE);
Result.REdef.Color := TColor(clWindow);
Result.REdef.OnKeyUp := Result.REdefKeyUp;
{$IFDEF OVERRIDE_SCROLLBARS}
OverrideScrollbars( Result.REdef);
{$ENDIF OVERRIDE_SCROLLBARS}
Result.btnPrev2.OnClick := Result.btnPrev2Click;
Result.btnNext2.OnClick := Result.btnNext2Click;
Result.lbKata.OnKeyUp := Result.lbKataKeyUp;
Result.lbKata.OnSelChange := Result.lbKataSelChange;
{$IFDEF OVERRIDE_SCROLLBARS}
OverrideScrollbars( Result.lbKata);
{$ENDIF OVERRIDE_SCROLLBARS}
Result.btnPrev1.OnClick := Result.btnPrev1Click;
Result.btnNext1.OnClick := Result.btnNext1Click;
Result.LblEf2.OnClick := Result.LblEf2Click;
Result.LblEf2.OnMouseMove := Result.LblEf2MouseMove;
Result.LblEf2.OnMouseLeave := Result.LblEf2MouseLeave;
Result.lbAdd.OnKeyUp := Result.lbAddKeyUp;
Result.lbAdd.OnSelChange := Result.lbAddSelChange;
{$IFDEF OVERRIDE_SCROLLBARS}
OverrideScrollbars( Result.lbAdd);
{$ENDIF OVERRIDE_SCROLLBARS}
Result.Form.CenterOnParent;
Result.KOLForm1FormCreate( Result );
end;