NxEdit OnGlyphClick Not Working
Started by deonvn, Aug 16 2007 12:04 PM
9 replies to this topic
#1
Posted 16 August 2007 - 12:04 PM
Hi Boki
The title says it all. NxEdit.OnGlyphClick does nothing.
Thanks
Deon
The title says it all. NxEdit.OnGlyphClick does nothing.
Thanks
Deon
#2
Posted 17 August 2007 - 01:03 PM
Hi Boki
Can you look at this when you get time? (it's not urgent - so "whenever" will be fine).
I'm trying to make a search/filter edit like the one in ThunderBird to do searches of set filters on specific columns.
(See attached screenshots)
NxEdit is already very close
- I just need to pop up a menu when the glyph is clicked.
For the life of me, I cannot get NxEdit to respond to MouseMove events when the mouse is in the glyph or preview areas
I would appreciate it if you can check what the problem is..
Thanks in advance.
Deon
Can you look at this when you get time? (it's not urgent - so "whenever" will be fine).
I'm trying to make a search/filter edit like the one in ThunderBird to do searches of set filters on specific columns.
(See attached screenshots)
NxEdit is already very close
For the life of me, I cannot get NxEdit to respond to MouseMove events when the mouse is in the glyph or preview areas
I would appreciate it if you can check what the problem is..
Thanks in advance.
Deon
Attached Files
#3
Posted 17 August 2007 - 01:27 PM
Hello Deon,
I will add now OnGlyphClick. Don't know how it is detached
Why you need MouseMove in this situation?
Best regards
I will add now OnGlyphClick. Don't know how it is detached
Why you need MouseMove in this situation?
Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#4
Posted 17 August 2007 - 01:34 PM
Update: I have fix OnGlyphClick.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#5
Posted 17 August 2007 - 01:45 PM
Great - thanks 
Can you send the new NxEdit.pas to my e-mail?
PS: I don't need MouseMove - I was justing using it to try and find out why the glyph is not responding to mouse events.
Thanks again
Deon
Can you send the new NxEdit.pas to my e-mail?
PS: I don't need MouseMove - I was justing using it to try and find out why the glyph is not responding to mouse events.
Thanks again
Deon
#6
Posted 17 August 2007 - 01:48 PM
Hello Deon,
Add next procedure:
and delete same code from TNxCustomEdit.MouseDown.
Best regards
Add next procedure:
CODE
TNxEditInfo = class...
...
protected
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
...
procedure TNxEditInfo.MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer);
begin
inherited;
if Assigned(FOwner.FGlyph) and not FOwner.FGlyph.Empty
and PtInRect(Rect(0, 0, FOwner.FGlyph.Width, Height), Point(X, Y)) then
begin
FOwner.DoGlyphClick;
end;
end;
...
protected
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
...
procedure TNxEditInfo.MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer);
begin
inherited;
if Assigned(FOwner.FGlyph) and not FOwner.FGlyph.Empty
and PtInRect(Rect(0, 0, FOwner.FGlyph.Width, Height), Point(X, Y)) then
begin
FOwner.DoGlyphClick;
end;
end;
and delete same code from TNxCustomEdit.MouseDown.
Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#7
Posted 17 August 2007 - 02:07 PM
Nope - did that - still doesn't work
#8
Posted 17 August 2007 - 02:17 PM
Hello Deon,
Maybe adding override at end of procedure in interface section may help (I have skip to include it):
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; override;
regards
Maybe adding override at end of procedure in interface section may help (I have skip to include it):
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; override;
regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#9
Posted 17 August 2007 - 02:23 PM
That's it - it's working fine now 
PS: I think the following two procedure need to check GlyphWidth and Indent for preview?
Thanks again.
Deon
PS: I think the following two procedure need to check GlyphWidth and Indent for preview?
CODE
procedure TNxEdit.MouseMove(Shift: TShiftState; X, Y: Integer);
begin
inherited;
if X <= 2 then Cursor := crReversedArrow else Cursor := crDefault;
end;
procedure TNxEdit.MouseDown(Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
inherited;
if X <= 2 then SelectAll;
end;
begin
inherited;
if X <= 2 then Cursor := crReversedArrow else Cursor := crDefault;
end;
procedure TNxEdit.MouseDown(Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
inherited;
if X <= 2 then SelectAll;
end;
Thanks again.
Deon
#10
Posted 17 August 2007 - 02:36 PM
Hello Deon,
I have fix it. Add one new procedure inside protected of TNxCustomEdit.
then code in both mouse events change with
into
Best regards
I have fix it. Add one new procedure inside protected of TNxCustomEdit.
CODE
function TNxCustomEdit.GetEditLeft: Integer;
begin
if FEditInfo.Visible then
begin
Result := FEditInfo.Left + FEditInfo.Width;
end else Result := 0;
end;
begin
if FEditInfo.Visible then
begin
Result := FEditInfo.Left + FEditInfo.Width;
end else Result := 0;
end;
then code in both mouse events change with
CODE
if X <= 2
into
CODE
if X <= GetEditLeft + 2
Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












