Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Syntax Edit
  New Posts New Posts RSS Feed - Few questions about SyntaxEdit
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Few questions about SyntaxEdit

 Post Reply Post Reply
Author
Message
smoreno View Drop Down
Newbie
Newbie


Joined: 21 January 2009
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote smoreno Quote  Post ReplyReply Direct Link To This Post Topic: Few questions about SyntaxEdit
    Posted: 21 January 2009 at 12:27pm
Hello! I´m a spanish developer and I want to include the Syntax Edit ActiveX control into my application. Before purchase the component I am trying to use and configure this control in a vcl c++ visual application and I have few questions:

Firstly, I want to know if I can disable breakpoints. I have been looking for this in the documentation and I haven´t found the way to do this. I don't need breakpoints and I need they never appear without disabling the SelectionMargin.

I also want to know if the ActiveX component provides a way for showing the Options Dialog which appears in the MFC sample application of the ToolkitProEval.MFC.v12.1.1 or I must implement it.

Finally, I could see that there isn't any funtion for collapse and expand all nodes in the syntax edit (ActiveX component). Maybe I am wrong. If there is a way to do this, please tell me.

Thank you in advance. Bye.
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 27 January 2009 at 1:26pm
Why don't get ToolkitPro and use it in your VC++ app with full power and source to use and modify?
Back to Top
mattatmilsoft View Drop Down
Newbie
Newbie


Joined: 12 February 2009
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote mattatmilsoft Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2009 at 10:10am
I'm guessing smoreno can't do that because he wants a "vcl c++" control, which means he's not using Microsoft, he's using CodeGear.

smoreno, how's the evaluation of SyntaxEdit coming? I'm in a similar situation, and am trying to decide whether to use SyntaxEdit or Scintilla.
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2009 at 3:02pm
1. There are SyntaxEditControl functions: void CollapseAll(); and void ExpandAll();
2. In VB sample Options control by VB own form - not a part of OCX. So you can implement one you like.
this is example of VB code from frmOptions - VB SyntaxEditSample:
 
Option Explicit
Public m_pSyntaxEdit As SyntaxEdit
Private m_pFont As New StdFont
Private Sub Apply(pSyntaxEdit As SyntaxEdit)
    pSyntaxEdit.Font.Bold = m_pFont.Bold
    pSyntaxEdit.Font.Italic = m_pFont.Italic
    pSyntaxEdit.Font.Name = m_pFont.Name
    pSyntaxEdit.Font.Size = m_pFont.Size
    pSyntaxEdit.Font.Strikethrough = m_pFont.Strikethrough
    pSyntaxEdit.Font.Underline = m_pFont.Underline
   
    pSyntaxEdit.ShowLineNumbers = IIf(chkLineNumbers.Value > 0, True, False)
    pSyntaxEdit.ShowSelectionMargin = IIf(chkSelMargin.Value > 0, True, False)
   
    pSyntaxEdit.ShowScrollBarVert = IIf(chkScrollVert.Value > 0, True, False)
    pSyntaxEdit.ShowScrollBarHorz = IIf(chkScrollHorz.Value > 0, True, False)
   
    pSyntaxEdit.EnableAutoIndent = IIf(chkAutoIndent.Value > 0, True, False)
    pSyntaxEdit.EnableVirtualSpace = IIf(chkVirtualSpace.Value > 0, True, False)
    pSyntaxEdit.EnableSyntaxColorization = IIf(chkSyntaxColorization.Value > 0, True, False)
   
End Sub
Public Sub ApplyTo(pSEdest As SyntaxEdit, pSEsrc As SyntaxEdit)
    pSEdest.Font.Bold = pSEsrc.Font.Bold
    pSEdest.Font.Italic = pSEsrc.Font.Italic
    pSEdest.Font.Name = pSEsrc.Font.Name
    pSEdest.Font.Size = pSEsrc.Font.Size
    pSEdest.Font.Strikethrough = pSEsrc.Font.Strikethrough
    pSEdest.Font.Underline = pSEsrc.Font.Underline
   
    pSEdest.ShowLineNumbers = pSEsrc.ShowLineNumbers
    pSEdest.ShowSelectionMargin = pSEsrc.ShowSelectionMargin
   
    pSEdest.ShowScrollBarVert = pSEsrc.ShowScrollBarVert
    pSEdest.ShowScrollBarHorz = pSEsrc.ShowScrollBarHorz
   
    pSEdest.EnableAutoIndent = pSEsrc.EnableAutoIndent
    pSEdest.EnableVirtualSpace = pSEsrc.EnableVirtualSpace
    pSEdest.EnableSyntaxColorization = pSEsrc.EnableSyntaxColorization
   
End Sub
Private Sub btnFont_Click()
   
    cmndlgFont.Flags = cdlCFBoth + cdlCFEffects + cdlCFForceFontExist + cdlCFFixedPitchOnly
  
    cmndlgFont.FontBold = m_pFont.Bold
    cmndlgFont.FontItalic = m_pFont.Italic
    cmndlgFont.FontName = m_pFont.Name
    cmndlgFont.FontSize = m_pFont.Size
    cmndlgFont.FontStrikethru = m_pFont.Strikethrough
    cmndlgFont.FontUnderline = m_pFont.Underline
   
    cmndlgFont.ShowFont
       
    m_pFont.Bold = cmndlgFont.FontBold
    m_pFont.Italic = cmndlgFont.FontItalic
    m_pFont.Name = cmndlgFont.FontName
    m_pFont.Size = cmndlgFont.FontSize
    m_pFont.Strikethrough = cmndlgFont.FontStrikethru
    m_pFont.Underline = cmndlgFont.FontUnderline
    txtFont.Caption = CLng(m_pFont.Size) & " pt. " & m_pFont.Name
    txtFont.Font.Bold = m_pFont.Bold
    txtFont.Font.Italic = m_pFont.Italic
    txtFont.Font.Strikethrough = m_pFont.Strikethrough
    txtFont.Font.Underline = m_pFont.Underline
End Sub
Private Sub cmdApply_Click()
    Apply m_pSyntaxEdit
End Sub
 
Private Sub cmdCancel_Click()
    Unload Me
End Sub
Private Sub cmdOK_Click()
    cmdApply_Click
   
    Unload Me
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Dim i As Integer
    i = tbsOptions.SelectedItem.Index
    'handle ctrl+tab to move to the next tab
    If (Shift And 3) = 2 And KeyCode = vbKeyTab Then
        If i = tbsOptions.Tabs.Count Then
            'last tab so we need to wrap to tab 1
            Set tbsOptions.SelectedItem = tbsOptions.Tabs(1)
        Else
            'increment the tab
            Set tbsOptions.SelectedItem = tbsOptions.Tabs(i + 1)
        End If
    ElseIf (Shift And 3) = 3 And KeyCode = vbKeyTab Then
        If i = 1 Then
            'last tab so we need to wrap to tab 1
            Set tbsOptions.SelectedItem = tbsOptions.Tabs(tbsOptions.Tabs.Count)
        Else
            'increment the tab
            Set tbsOptions.SelectedItem = tbsOptions.Tabs(i - 1)
        End If
    End If
End Sub

Private Sub Form_Load()
    m_pFont.Bold = m_pSyntaxEdit.Font.Bold
    m_pFont.Italic = m_pSyntaxEdit.Font.Italic
    m_pFont.Name = m_pSyntaxEdit.Font.Name
    m_pFont.Size = m_pSyntaxEdit.Font.Size
    m_pFont.Strikethrough = m_pSyntaxEdit.Font.Strikethrough
    m_pFont.Underline = m_pSyntaxEdit.Font.Underline
   
    txtFont.Caption = CLng(m_pFont.Size) & " pt. " & m_pFont.Name
    txtFont.Font.Bold = m_pFont.Bold
    txtFont.Font.Italic = m_pFont.Italic
    txtFont.Font.Strikethrough = m_pFont.Strikethrough
    txtFont.Font.Underline = m_pFont.Underline
   
    chkLineNumbers.Value = IIf(m_pSyntaxEdit.ShowLineNumbers, 1, 0)
    chkSelMargin.Value = IIf(m_pSyntaxEdit.ShowSelectionMargin, 1, 0)
   
    chkScrollVert.Value = IIf(m_pSyntaxEdit.ShowScrollBarVert, 1, 0)
    chkScrollHorz.Value = IIf(m_pSyntaxEdit.ShowScrollBarHorz, 1, 0)
   
    chkAutoIndent.Value = IIf(m_pSyntaxEdit.EnableAutoIndent, 1, 0)
    chkVirtualSpace.Value = IIf(m_pSyntaxEdit.EnableVirtualSpace, 1, 0)
    chkSyntaxColorization.Value = IIf(m_pSyntaxEdit.EnableSyntaxColorization, 1, 0)
   
End Sub
Private Sub Form_Unload(Cancel As Integer)
    Set m_pSyntaxEdit = Nothing
End Sub
Private Sub tbsOptions_Click()
   
    Dim i As Integer
    'show and enable the selected tab's controls
    'and hide and disable all others
    For i = 0 To tbsOptions.Tabs.Count - 1
        If i = tbsOptions.SelectedItem.Index - 1 Then
            picOptions(i).Left = 210
            picOptions(i).Enabled = True
        Else
            picOptions(i).Left = -20000
            picOptions(i).Enabled = False
        End If
    Next
   
End Sub
 
Back to Top
lperis View Drop Down
Newbie
Newbie


Joined: 18 October 2010
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote lperis Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2010 at 12:20pm
Hi folks!!

I've been looking for some info about disabling the SyntaxEdit breakpoints and I only could find this post. So before creating a new topic I've preferred try to reactive this thread.

My question is the same as Sergio's unanswered question. I'm using the ActiveX component as a vcl c++ control, and I would like to disable the breakpoints, so is there any way to not display the breakpoints?

Thanks in advance.

Greetings.
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.143 seconds.