improved OnEnter for gtkcombo

git-svn-id: trunk@4663 -
This commit is contained in:
mattias 2003-09-23 08:00:46 +00:00
parent 34cec4abfd
commit aab0dd3956
8 changed files with 155 additions and 142 deletions

View File

@ -1,32 +1,31 @@
/* XPM */ /* XPM */
static char * tdbgrid_xpm[] = { static char * tdbgrid_xpm[] = {
"23 23 6 1", "23 23 5 1",
" c None", " c None",
". c #A0978F", ". c #7F7F7F",
"+ c #7F7F7F", "+ c #BFBFBF",
"@ c #BFBFBF", "@ c #FFFFFF",
"# c #FFFFFF", "# c #000000",
"$ c #000000", " ",
".......................", " ............... ",
".+++++++++++++++.......", " .+.@++++@+++++. ",
".+@+#@@@@#@@@@@+.......", " ............... ",
".+++++++++++++++.......", " .+.@@@@+@@@@@@. ",
".+@+####@######+.......", " .@.@++@+@++++@. ",
".+#+#@@#@#@@@@#+.......", " .+.@@@@+@@@@@@. ",
".+@+####@######+.......", " .@.@++@+@+++@@. ",
".+#+#@@#@#@@@##+.......", " .+.@@@@+@@@@@@. ",
".+@+####@######+.......", " .@.################## ",
".+#+$$$$$$$$$$$$$$$$$$.", " .+.#+#@+++++@+++++++# ",
".+@+$@$#@@@@@#@@@@@@@$.", " ...################## ",
".+++$$$$$$$$$$$$$$$$$$.", " #+#@@@@@+@@@@@@@@# ",
"....$@$#####@########$.", " #@#++++++++++++++# ",
"....$#$@@@@@@@@@@@@@@$.", " #+#@@@@@+@@@@@@@@# ",
"....$@$#####@########$.", " #@#++++++++++++++# ",
"....$#$@@@@@@@@@@@@@@$.", " #+#@@@@@+@@@@@@@@# ",
"....$@$#####@########$.", " #@#++++++++++++++# ",
"....$#$@@@@@@@@@@@@@@$.", " #+#@@@@@+@@@@@@@@# ",
"....$@$#####@########$.", " #@#++++++++++++++# ",
"....$#$@@@@@@@@@@@@@@$.", " #+#@@@@@+@@@@@@@@# ",
"....$@$#####@########$.", " ################## ",
"....$$$$$$$$$$$$$$$$$$.", " "};
"......................."};

View File

@ -2,31 +2,31 @@
static char * tdrawgrid_xpm[] = { static char * tdrawgrid_xpm[] = {
"23 23 6 1", "23 23 6 1",
" c None", " c None",
". c #C0C0C0", ". c #000000",
"+ c #000000", "+ c #C0C0C0",
"@ c #FFFFFF", "@ c #FFFFFF",
"# c #909090", "# c #909090",
"$ c #000080", "$ c #000080",
".......................", " ",
".++++++++++++++++++....", " .................. ",
".+.+@.....@.......+#...", " .+.@+++++@+++++++.# ",
".++++++++++++++++++#...", " ..................# ",
".+.+@@@@@.@@@@@@@@+#...", " .+.@@@@@+@@@@@@@@.# ",
".+@+@$$$@.@$$$$$$@+#...", " .@.@$$$@+@$$$$$$@.# ",
".+.+@@@@@.@@@@@@@@+#...", " .+.@@@@@+@@@@@@@@.# ",
".+@+@$$$@.@$$$$$@@+#...", " .@.@$$$@+@$$$$$@@.# ",
".+.+@@@@@.@@@@@@@@+#...", " .+.@@@@@+@@@@@@@@.# ",
".+@+@$$$@.@$$$$$$@+#...", " .@.@$$$@+@$$$$$$@.# ",
".+.+@@@@@.@@@@@@@@+#...", " .+.@@@@@+@@@@@@@@.# ",
".++++++++++++++++++#...", " ..................# ",
"..############+#####...", " ############.##### ",
".............#+#.......", " #.# ",
".............+@+.......", " .@. ",
"............#+@+#......", " #.@.# ",
"............+@@@+#++++.", " .@@@.#.... ",
"..........++++@@+@.@.+.", " ....@@.@+@+. ",
".........+$$$$+@@+@.@+.", " .$$$$.@@.@+@. ",
".........+$$$$++++.@.+.", " .$$$$....+@+. ",
".........+$$$$+.+.@.@+.", " .$$$$. .+@+@. ",
".........+$$$$+.++++++.", " .$$$$. ...... ",
"..........++++........."}; " .... "};

View File

@ -2,30 +2,30 @@
static char * tstringgrid_xpm[] = { static char * tstringgrid_xpm[] = {
"23 23 5 1", "23 23 5 1",
" c None", " c None",
". c #C0C0C0", ". c #000000",
"+ c #000000", "+ c #C0C0C0",
"@ c #FFFFFF", "@ c #FFFFFF",
"# c #000080", "# c #000080",
".......................", " ",
".++++++++++++++++++....", " .................. ",
".+.+@.....@.......+....", " .+.@+++++@+++++++. ",
".++++++++++++++++++....", " .................. ",
".+.+@@@@@.@@@@@@@@+....", " .+.@@@@@+@@@@@@@@. ",
".+@+@###@.@######@+....", " .@.@###@+@######@. ",
".+.+@@@@@.@@@@@@@@+....", " .+.@@@@@+@@@@@@@@. ",
".+@+@###@.@#####@@+....", " .@.@###@+@#####@@. ",
".+.+@@@@@.@@@@@@@@+....", " .+.@@@@@+@@@@@@@@. ",
".+@+@###@.@######@+....", " .@.@###@+@######@. ",
".+.+@@@@@.@@@@@@@@+....", " .+.@@@@@+@@@@@@@@. ",
".+@+@###@.@#####@@+....", " .@.@###@+@#####@@. ",
".+.+@@@@@.@@@@@@@@+....", " .+.@@@@@+@@@@@@@@. ",
".++++++++++++++++++....", " .................. ",
".............#.........", " # ",
".............#.........", " # ",
".........##..###...##..", " ## ### ## ",
"...........#.#..#.#..#.", " # # # # # ",
".........###.#..#.#....", " ### # # # ",
"........#..#.#..#.#....", " # # # # # ",
"........#..#.#..#.#..#.", " # # # # # # ",
".........###.###...##..", " ### ### ## ",
"......................."}; " "};

View File

@ -640,19 +640,18 @@ LazarusResources.Add('tdbedit','XPM',[
+'q m.+ + + } "};'#10 +'q m.+ + + } "};'#10
]); ]);
LazarusResources.Add('tdbgrid','XPM',[ LazarusResources.Add('tdbgrid','XPM',[
'/* XPM */'#10'static char * tdbgrid_xpm[] = {'#10'"23 23 6 1",'#10'" '#9'c N' '/* XPM */'#10'static char * tdbgrid_xpm[] = {'#10'"23 23 5 1",'#10'" '#9'c N'
+'one",'#10'".'#9'c #A0978F",'#10'"+'#9'c #7F7F7F",'#10'"@'#9'c #BFBFBF",'#10 +'one",'#10'".'#9'c #7F7F7F",'#10'"+'#9'c #BFBFBF",'#10'"@'#9'c #FFFFFF",'#10
+'"#'#9'c #FFFFFF",'#10'"$'#9'c #000000",'#10'".......................",'#10 +'"#'#9'c #000000",'#10'" ",'#10'" ............... '
+'".+++++++++++++++.......",'#10'".+@+#@@@@#@@@@@+.......",'#10'".+++++++++++' +' ",'#10'" .+.@++++@+++++. ",'#10'" ............... ",'#10'" .+'
+'++++.......",'#10'".+@+####@######+.......",'#10'".+#+#@@#@#@@@@#+.......",' +'.@@@@+@@@@@@. ",'#10'" .@.@++@+@++++@. ",'#10'" .+.@@@@+@@@@@@.'
+#10'".+@+####@######+.......",'#10'".+#+#@@#@#@@@##+.......",'#10'".+@+####@' +' ",'#10'" .@.@++@+@+++@@. ",'#10'" .+.@@@@+@@@@@@. ",'#10
+'######+.......",'#10'".+#+$$$$$$$$$$$$$$$$$$.",'#10'".+@+$@$#@@@@@#@@@@@@@$' +'" .@.################## ",'#10'" .+.#+#@+++++@+++++++# ",'#10'" ...########'
+'.",'#10'".+++$$$$$$$$$$$$$$$$$$.",'#10'"....$@$#####@########$.",'#10'"....' +'########## ",'#10'" #+#@@@@@+@@@@@@@@# ",'#10'" #@#++++++++++++++# ",'
+'$#$@@@@@@@@@@@@@@$.",'#10'"....$@$#####@########$.",'#10'"....$#$@@@@@@@@@@' +#10'" #+#@@@@@+@@@@@@@@# ",'#10'" #@#++++++++++++++# ",'#10'" #+#@@'
+'@@@@$.",'#10'"....$@$#####@########$.",'#10'"....$#$@@@@@@@@@@@@@@$.",'#10 +'@@@+@@@@@@@@# ",'#10'" #@#++++++++++++++# ",'#10'" #+#@@@@@+@@@@@@@@#'
+'"....$@$#####@########$.",'#10'"....$#$@@@@@@@@@@@@@@$.",'#10'"....$@$#####' +' ",'#10'" #@#++++++++++++++# ",'#10'" #+#@@@@@+@@@@@@@@# ",'#10'" '
+'@########$.",'#10'"....$$$$$$$$$$$$$$$$$$.",'#10'"......................."}' +'################## ",'#10'" "};'#10
+';'#10
]); ]);
LazarusResources.Add('tdbgroupbox','XPM',[ LazarusResources.Add('tdbgroupbox','XPM',[
'/* XPM */'#10'static char * tdbgroupbox_xpm[] = {'#10'"23 23 7 1",'#10'" '#9 '/* XPM */'#10'static char * tdbgroupbox_xpm[] = {'#10'"23 23 7 1",'#10'" '#9
@ -896,18 +895,18 @@ LazarusResources.Add('tdbtext','XPM',[
]); ]);
LazarusResources.Add('tdrawgrid','XPM',[ LazarusResources.Add('tdrawgrid','XPM',[
'/* XPM */'#10'static char * tdrawgrid_xpm[] = {'#10'"23 23 6 1",'#10'" '#9'c' '/* XPM */'#10'static char * tdrawgrid_xpm[] = {'#10'"23 23 6 1",'#10'" '#9'c'
+' None",'#10'".'#9'c #C0C0C0",'#10'"+'#9'c #000000",'#10'"@'#9'c #FFFFFF",' +' None",'#10'".'#9'c #000000",'#10'"+'#9'c #C0C0C0",'#10'"@'#9'c #FFFFFF",'
+#10'"#'#9'c #909090",'#10'"$'#9'c #000080",'#10'".......................",' +#10'"#'#9'c #909090",'#10'"$'#9'c #000080",'#10'" ",'
+#10'".++++++++++++++++++....",'#10'".+.+@.....@.......+#...",'#10'".++++++++' +#10'" .................. ",'#10'" .+.@+++++@+++++++.# ",'#10'" ........'
+'++++++++++#...",'#10'".+.+@@@@@.@@@@@@@@+#...",'#10'".+@+@$$$@.@$$$$$$@+#..' +'..........# ",'#10'" .+.@@@@@+@@@@@@@@.# ",'#10'" .@.@$$$@+@$$$$$$@.# '
+'.",'#10'".+.+@@@@@.@@@@@@@@+#...",'#10'".+@+@$$$@.@$$$$$@@+#...",'#10'".+.+' +' ",'#10'" .+.@@@@@+@@@@@@@@.# ",'#10'" .@.@$$$@+@$$$$$@@.# ",'#10'" .+.'
+'@@@@@.@@@@@@@@+#...",'#10'".+@+@$$$@.@$$$$$$@+#...",'#10'".+.+@@@@@.@@@@@@@' +'@@@@@+@@@@@@@@.# ",'#10'" .@.@$$$@+@$$$$$$@.# ",'#10'" .+.@@@@@+@@@@@@@'
+'@+#...",'#10'".++++++++++++++++++#...",'#10'"..############+#####...",'#10 +'@.# ",'#10'" ..................# ",'#10'" ############.##### ",'#10
+'".............#+#.......",'#10'".............+@+.......",'#10'"............' +'" #.# ",'#10'" .@. ",'#10'" '
+'#+@+#......",'#10'"............+@@@+#++++.",'#10'"..........++++@@+@.@.+.",' +'#.@.# ",'#10'" .@@@.#.... ",'#10'" ....@@.@+@+. ",'
+#10'".........+$$$$+@@+@.@+.",'#10'".........+$$$$++++.@.+.",'#10'".........' +#10'" .$$$$.@@.@+@. ",'#10'" .$$$$....+@+. ",'#10'" '
+'+$$$$+.+.@.@+.",'#10'".........+$$$$+.++++++.",'#10'"..........++++........' +'.$$$$. .+@+@. ",'#10'" .$$$$. ...... ",'#10'" .... '
+'."};'#10 +' "};'#10
]); ]);
LazarusResources.Add('tedit','XPM',[ LazarusResources.Add('tedit','XPM',[
'/* XPM */'#10'static char * tedit_xpm[] = {'#10'"23 16 157 2",'#10'" '#9'c ' '/* XPM */'#10'static char * tedit_xpm[] = {'#10'"23 16 157 2",'#10'" '#9'c '
@ -2113,17 +2112,17 @@ LazarusResources.Add('tstatusbar','XPM',[
]); ]);
LazarusResources.Add('tstringgrid','XPM',[ LazarusResources.Add('tstringgrid','XPM',[
'/* XPM */'#10'static char * tstringgrid_xpm[] = {'#10'"23 23 5 1",'#10'" '#9 '/* XPM */'#10'static char * tstringgrid_xpm[] = {'#10'"23 23 5 1",'#10'" '#9
+'c None",'#10'".'#9'c #C0C0C0",'#10'"+'#9'c #000000",'#10'"@'#9'c #FFFFFF",' +'c None",'#10'".'#9'c #000000",'#10'"+'#9'c #C0C0C0",'#10'"@'#9'c #FFFFFF",'
+#10'"#'#9'c #000080",'#10'".......................",'#10'".+++++++++++++++++' +#10'"#'#9'c #000080",'#10'" ",'#10'" .................'
+'+....",'#10'".+.+@.....@.......+....",'#10'".++++++++++++++++++....",'#10'"' +'. ",'#10'" .+.@+++++@+++++++. ",'#10'" .................. ",'#10'"'
+'.+.+@@@@@.@@@@@@@@+....",'#10'".+@+@###@.@######@+....",'#10'".+.+@@@@@.@@@' +' .+.@@@@@+@@@@@@@@. ",'#10'" .@.@###@+@######@. ",'#10'" .+.@@@@@+@@@'
+'@@@@@+....",'#10'".+@+@###@.@#####@@+....",'#10'".+.+@@@@@.@@@@@@@@+....",' +'@@@@@. ",'#10'" .@.@###@+@#####@@. ",'#10'" .+.@@@@@+@@@@@@@@. ",'
+#10'".+@+@###@.@######@+....",'#10'".+.+@@@@@.@@@@@@@@+....",'#10'".+@+@###@' +#10'" .@.@###@+@######@. ",'#10'" .+.@@@@@+@@@@@@@@. ",'#10'" .@.@###@'
+'.@#####@@+....",'#10'".+.+@@@@@.@@@@@@@@+....",'#10'".++++++++++++++++++...' +'+@#####@@. ",'#10'" .+.@@@@@+@@@@@@@@. ",'#10'" .................. '
+'.",'#10'".............#.........",'#10'".............#.........",'#10'"....' +' ",'#10'" # ",'#10'" # ",'#10'" '
+'.....##..###...##..",'#10'"...........#.#..#.#..#.",'#10'".........###.#..#' +' ## ### ## ",'#10'" # # # # # ",'#10'" ### # #'
+'.#....",'#10'"........#..#.#..#.#....",'#10'"........#..#.#..#.#..#.",'#10 +' # ",'#10'" # # # # # ",'#10'" # # # # # # ",'#10
+'".........###.###...##..",'#10'"......................."};'#10 +'" ### ### ## ",'#10'" "};'#10
]); ]);
LazarusResources.Add('ttimer','XPM',[ LazarusResources.Add('ttimer','XPM',[
'/* XPM */'#10'static char * ttimer_xpm[] = {'#10'"17 17 5 1",'#10'" '#9'c No' '/* XPM */'#10'static char * ttimer_xpm[] = {'#10'"17 17 5 1",'#10'" '#9'c No'

View File

@ -1845,6 +1845,9 @@ end.
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.152 2003/09/23 08:00:46 mattias
improved OnEnter for gtkcombo
Revision 1.151 2003/09/20 13:27:49 mattias Revision 1.151 2003/09/20 13:27:49 mattias
varois improvements for ParentColor from Micha varois improvements for ParentColor from Micha

View File

@ -3096,6 +3096,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.172 2003/09/23 08:00:46 mattias
improved OnEnter for gtkcombo
Revision 1.171 2003/09/20 13:27:49 mattias Revision 1.171 2003/09/20 13:27:49 mattias
varois improvements for ParentColor from Micha varois improvements for ParentColor from Micha

View File

@ -3915,6 +3915,14 @@ procedure TGTKObject.SetCallback(Msg : LongInt; Sender: TObject);
ReqSignalMask); ReqSignalMask);
end; end;
procedure ConnectFocusEvents(const AnObject: PGTKObject);
begin
ConnectSenderSignal(AnObject, 'focus-in-event', @gtkFocusCB);
ConnectSenderSignalAfter(AnObject, 'focus-in-event', @gtkFocusCBAfter);
ConnectSenderSignal(AnObject, 'focus-out-event', @gtkKillFocusCB);
ConnectSenderSignalAfter(AnObject, 'focus-out-event', @gtkKillFocusCBAfter);
end;
var var
gObject, gFixed, gCore, Scroll: PGTKObject; gObject, gFixed, gCore, Scroll: PGTKObject;
begin begin
@ -4008,20 +4016,11 @@ begin
LM_FOCUS : LM_FOCUS :
begin begin
if (sender is TCustomComboBox) then begin if (Sender is TCustomComboBox) then begin
ConnectSenderSignal(PgtkObject(PgtkCombo(gObject)^.entry), ConnectFocusEvents(PgtkObject(PgtkCombo(gObject)^.entry));
'focus-in-event', @gtkFocusCB); ConnectFocusEvents(PgtkObject(PgtkCombo(gObject)^.list));
ConnectSenderSignal(PgtkObject(PgtkCombo(gObject)^.entry),
'focus-out-event', @gtkKillFocusCBAfter);
ConnectSenderSignal(PgtkObject(PgtkCombo(gObject)^.list),
'focus-in-event', @gtkFocusCB);
ConnectSenderSignal(PgtkObject(PgtkCombo(gObject)^.list),
'focus-out-event', @gtkKillFocusCBAfter);
end else begin end else begin
ConnectSenderSignal(gCore, 'focus-in-event', @gtkFocusCB); ConnectFocusEvents(gCore);
ConnectSenderSignalAfter(gCore, 'focus-in-event', @gtkFocusCBAfter);
ConnectSenderSignal(gCore, 'focus-out-event', @gtkKillFocusCB);
ConnectSenderSignalAfter(gCore, 'focus-out-event', @gtkKillFocusCBAfter);
end; end;
end; end;
@ -8387,6 +8386,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.425 2003/09/23 08:00:46 mattias
improved OnEnter for gtkcombo
Revision 1.424 2003/09/22 20:08:56 ajgenius Revision 1.424 2003/09/22 20:08:56 ajgenius
break GTK2 object and winapi into includes like the GTK interface break GTK2 object and winapi into includes like the GTK interface

View File

@ -302,9 +302,23 @@ type
property Enabled; property Enabled;
property Font; property Font;
property ItemHeight; property ItemHeight;
property ItemWidth;
property Items; property Items;
property ItemWidth;
property MaxLength default -1; property MaxLength default -1;
property OnChange;
property OnChangeBounds;
property OnClick;
property OnCloseUp;
property OnDrawItem;
property OnDropDown;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property ParentCtl3D; property ParentCtl3D;
property ParentFont; property ParentFont;
property ParentShowHint; property ParentShowHint;
@ -315,16 +329,6 @@ type
property TabStop; property TabStop;
property Text; property Text;
property Visible; property Visible;
property OnChange;
property OnClick;
property OnCloseUp;
property OnDrawItem;
property OnDropDown;
property OnEnter;
property OnExit;
property OnKeyPress;
Property OnKeyDown;
Property OnKeyUp;
end; end;
@ -1462,6 +1466,9 @@ end.
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.106 2003/09/23 08:00:46 mattias
improved OnEnter for gtkcombo
Revision 1.105 2003/09/18 11:24:29 mattias Revision 1.105 2003/09/18 11:24:29 mattias
started TDBMemo started TDBMemo