Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Syntax Edit
  New Posts New Posts RSS Feed - Right-click bug in SyntaxEdit
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Right-click bug in SyntaxEdit

 Post Reply Post Reply
Author
Message
PPL1 View Drop Down
Groupie
Groupie


Joined: 10 April 2006
Location: Canada
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote PPL1 Quote  Post ReplyReply Direct Link To This Post Topic: Right-click bug in SyntaxEdit
    Posted: 18 August 2008 at 3:46pm
SyntaxEdit seems to have a problem with right-click and tabs.
 
If the line contains a tab character, the right-click does not move the focus to the correct position. Tabs seem to count as 1 chr.

1-Take the Syntax Edit sample. Add 2 lines:
Function
[tab]Function
2- Right-click at the end of the first line. Focus goes to the end as expected
3- Right-click at the end of the Second line. Focus goes to the ''t'' of Function.

With this bug, context menus become useless for copy/paste
Back to Top
PPL1 View Drop Down
Groupie
Groupie


Joined: 10 April 2006
Location: Canada
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote PPL1 Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2008 at 4:20pm
This is a major problem and not fixed in the latest 12.0.2!!! How can one provide such basic feature as context menu with this major bug !!!
 
Even your sample app has this bug:
 
Is anyone using the SyntaxEditor ???
Back to Top
ijwelch View Drop Down
Senior Member
Senior Member


Joined: 20 June 2006
Status: Offline
Points: 262
Post Options Post Options   Thanks (0) Thanks(0)   Quote ijwelch Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2008 at 9:00pm
Think need to email to support to have chance to get fixed. Not everything in forum is dealt with it seems.
Back to Top
PPL1 View Drop Down
Groupie
Groupie


Joined: 10 April 2006
Location: Canada
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote PPL1 Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2008 at 9:10pm
This was done on Aug 12th, nearly 2 weeks ago. Assigned, but no reply
 
I'm curious how many people are actually using SyntaxEdit in a production environment? And how they are handling context menus ?...
 
(or are they simply saying to customers: "Folks, don't hit the Tab key to indent (and edit all your code files to remove them) otherwise, your copy/paste operations will corrupt your code" )
Back to Top
peerschindel View Drop Down
Groupie
Groupie


Joined: 12 July 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote peerschindel Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2008 at 12:18pm
Hi PPL1,

we plan to use it in our software in the next version.
We have always been thinking about programing syntax coloring on
our own, but it seemed too much work (would have taken several
months, I guess)
So we downloaded the demo and it looked very nice at the 1st moment
So we bought it and integrated it in our software
(took ca. 1 week).
Then I found all the small bugs (took me altogether 2 weeks to make
it work fine).
Regarding the tab problem:
In the MFC version it can be easily fixed by replacing:
"CalcValidDispCol" with "CalcDispCol" in
"CXTPSyntaxEditCtrl::OnRButtonDown" and compiling the Lib/Dll
(or by overriding the message handler, copy the original source code
and make the replacement - then you don't need to compile the Lib/dll)
 
Now a small request:
I bought version 12.0.1. Do you have a list of things that were
changed/fixed in 12.0.2 or were I can get it? Because I would like to
know what other problems, that I don't know until now, I have to expect.
Best regards

Back to Top
PPL1 View Drop Down
Groupie
Groupie


Joined: 10 April 2006
Location: Canada
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote PPL1 Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2008 at 8:10am
bump
Back to Top
PPL1 View Drop Down
Groupie
Groupie


Joined: 10 April 2006
Location: Canada
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote PPL1 Quote  Post ReplyReply Direct Link To This Post Posted: 15 September 2008 at 9:16am
bump (again)
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 15 September 2008 at 9:55am
Hi,
 
I'm glad I don't use SyntaxEdit control...
 
I think SyntaxEdit developers are on their holiday (for a few months...) It's really annoying when you have to wait for an answer that long. If I were you I would post one in the Commandbar forum, Oleg will wake some developers who are in charge of SyntaxEdit control
 
Good luck
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
PPL1 View Drop Down
Groupie
Groupie


Joined: 10 April 2006
Location: Canada
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote PPL1 Quote  Post ReplyReply Direct Link To This Post Posted: 22 September 2008 at 12:48pm
Bump...
 
One more week and still no answer from CJ (neither here nor through support). I looks like SyntaxEdit is dead.
 
As I need a VBScript editor, I may need to start looking at the competition (BCGSoft and free Scintilla are the ones that comes to mind...)
Back to Top
PPL1 View Drop Down
Groupie
Groupie


Joined: 10 April 2006
Location: Canada
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote PPL1 Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2008 at 10:26am

This has been proposed as a solution (for those using the MFC version):

-----------------------
In the MFC version it can be easily fixed by replacing:
"CalcValidDispCol" with "CalcDispCol" in
"CXTPSyntaxEditCtrl::OnRButtonDown" and compiling the Lib/Dll
(or by overriding the message handler, copy the original source code

and make the replacement - then you don't need to compile the Lib/dll)
 
------------------------
 
For the ActiveX, could monitoring the mousedown (or right-click) Windows message and cancelling it be used to trick the control?
Back to Top
PPL1 View Drop Down
Groupie
Groupie


Joined: 10 April 2006
Location: Canada
Status: Offline
Points: 70
Post Options Post Options   Thanks (0) Thanks(0)   Quote PPL1 Quote  Post ReplyReply Direct Link To This Post Posted: 03 October 2008 at 9:16am
Bump again...  6 weeks and no reply from CJ (here or in customer support).
 
A simple acknowledgement would be nice...
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 03 October 2008 at 12:25pm
Hi PPL1...

I took a look at the SyntaxEditor (I don't use it myself) to see if I could come up with a workaround, and I may have found one. I noticed that the control responds correctly to LEFT mouse button clicks, so I thought that I would try to simulate a left click during a right click, and it seems to work. Please note that I have only done limited testing, so there may be other problems to solve yet...

Try this code on a form with a SyntaxEdit (SyntaxEdit1) control:


Option Explicit

Private Type POINTAPI
        x As Long
        y As Long
End Type

Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)

Private Const MOUSEEVENTF_ABSOLUTE = &H8000 '  absolute move
Private Const MOUSEEVENTF_LEFTDOWN = &H2 '  left button down
Private Const MOUSEEVENTF_LEFTUP = &H4 '  left button up

Private m_IgnoreMouseDown As Boolean

Private Sub SyntaxEdit1_MouseDown(Button As Integer, Shift As Integer, x As Long, y As Long)
   If Not m_IgnoreMouseDown Then
      ' Not a simulated mouse click, so process click as required
      Select Case Button
      Case vbRightButton
         ' Hide caret to prevent flickering
         Me.SyntaxEdit1.HideCaret = True
      Case vbLeftButton
         ' Perform Left button processing here
      End Select
   End If
End Sub

Private Sub SyntaxEdit1_MouseUp(Button As Integer, Shift As Integer, x As Long, y As Long)
   Dim l_Mouse As POINTAPI
  
   Select Case Button
   Case vbRightButton
     
      m_IgnoreMouseDown = True   ' Set flag to ignore simulated mouse click
  
      Me.SyntaxEdit1.HideCaret = False ' Show the caret
           
      ' Simulate mouse click
      mouse_event MOUSEEVENTF_ABSOLUTE + MOUSEEVENTF_LEFTDOWN, l_Mouse.x, l_Mouse.y, 0, 0
      mouse_event MOUSEEVENTF_ABSOLUTE + MOUSEEVENTF_LEFTUP, l_Mouse.x, l_Mouse.y, 0, 0
     
      m_IgnoreMouseDown = False  ' Set flag to process mouse clicks normally
     
   End Select
End Sub



Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 06 October 2008 at 3:20am
Hello,
 
Thanks, Pierre, fixed for 12.1 release. Sorry for such delay.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.