#include "FiveWin.ch"
#include "Scintilla.ch"
function Main()
聽 聽LOCAL cIni, oWnd, nBits
聽 聽DEFINE WINDOW oWnd TITLE "TLPosWin - EtiE"
聽 聽//cIni := MemoRead("C:\TL\Utility\TLEtiW\test\Pos\Mag1\Eti\0_pelllicano_scaffale_pdf.ini")
聽 聽cIni := MemoRead("C:\pos\config\tlposwin.ini")
聽 聽//cIni := MemoRead("C:\fwh32\samples\scintilla\src\SciTE.properties")
聽 聽nBits := SCLEX_PROPERTIES
聽 聽oWnd:oClient := MyScintilla():New( 0, 0, 10,10,oWnd,RGB(0,0,0), RGB(255,255,255),SCLEX_PROPERTIES)
聽 聽oWnd:oClient:SetText(cIni)
聽 聽oWnd:oClient:Refresh()
聽 聽ACTIVATE WINDOW oWnd
return 0
class MyScintilla FROM TScintilla
聽 聽METHOD Setup
endclass
METHOD Setup( nMark, lInit ) CLASS MyScintilla
聽 聽::SendMsg( SCI_SETLEXER, SCLEX_PROPERTIES, 0 )
聽 聽::SendMsg( SCI_SETSTYLEBITS, 5 )
聽 聽::SendMsg(SCI_STYLECLEARALL)
聽 聽::SendMsg(SCI_STYLESETFORE, SCE_PROPS_DEFAULT 聽 , CLR_BLACK)
聽 聽::SendMsg(SCI_STYLESETFORE, SCE_PROPS_COMMENT 聽 , CLR_GRAY)
聽 聽::SendMsg(SCI_STYLESETFORE, SCE_PROPS_SECTION 聽 , CLR_BLUE)
聽 聽::SendMsg(SCI_STYLESETFORE, SCE_PROPS_ASSIGNMENT, RGB(255, 128, 0))
聽 聽::SendMsg(SCI_STYLESETFORE, SCE_PROPS_DEFVAL 聽 聽, RGB(0, 0, 128))
聽 聽::SendMsg(SCI_STYLESETFORE, SCE_PROPS_KEY 聽 聽 聽 , CLR_RED)
聽 聽::SendMsg(SCI_STYLESETBOLD, SCE_PROPS_KEY, 1)
聽 聽::SendMsg(SCI_STYLESETEOLFILLED, 聽SCE_PROPS_SECTION, 1)
聽 聽PonFold( ::hWnd , "lexer.props.allow.initial.spaces" , "1" )
聽 聽PonFold( ::hWnd , "fold" , "1" )
聽 聽PonFold( ::hWnd , "fold.compact" , "0" )
聽 聽
聽 聽::SendMsg( SCI_STYLESETFONT,STYLE_DEFAULT, "Lucida Console" )
聽 聽::SendMsg( SCI_SETMARGINTYPEN, 1, SC_MARGIN_NUMBER )
聽 聽::SendMsg( SCI_SETMARGINWIDTHN, 1, 40 )
聽 聽::SendMsg( SCI_SETMARGINSENSITIVEN, 1, 1)
聽 聽//::Send( SCI_STYLESETBACK , STYLE_LINENUMBER , RGB(0,255,255) ) //CLR_VSBAR )
聽 聽//::Send( SCI_STYLESETFORE , STYLE_LINENUMBER , RGB(0,255,255)) //CLR_BLUE )
聽 聽 聽
聽 聽::SendMsg(SCI_SETAUTOMATICFOLD, SC_AUTOMATICFOLD_CLICK,0)
聽 聽::SendMsg( SCI_SETMARGINTYPEN, 2, SC_MARGIN_SYMBOL )
聽 聽::SendMsg( SCI_SETMARGINWIDTHN, 2, 15 )
聽 聽::SendMsg( SCI_SETMARGINMASKN , 2, SC_MASK_FOLDERS )
聽 聽::SendMsg( SCI_SETMARGINSENSITIVEN, 2, 1 )
聽 聽::SendMsg( SCI_SETFOLDMARGINCOLOUR, 2, RGB(0,255,255) ) //CLR_VSBAR )
聽 聽::SendMsg( SCI_MARKERDEFINE,SC_MARKNUM_FOLDEROPEN,SC_MARK_BOXMINUS)
聽 聽::SendMsg( SCI_MARKERDEFINE,SC_MARKNUM_FOLDER,SC_MARK_BOXPLUS)
聽 聽::SendMsg( SCI_MARKERDEFINE,SC_MARKNUM_FOLDERSUB,SC_MARK_VLINE)
聽 聽::SendMsg( SCI_MARKERDEFINE,SC_MARKNUM_FOLDERTAIL,SC_MARK_LCORNERCURVE)
聽 聽::SendMsg( SCI_MARKERSETFORE,SC_MARKNUM_FOLDER, CLR_WHITE)
聽 聽::SendMsg( SCI_MARKERSETBACK,SC_MARKNUM_FOLDER, CLR_BLACK)
聽 聽::SendMsg( SCI_MARKERSETFORE,SC_MARKNUM_FOLDEROPEN,CLR_WHITE)
聽 聽::SendMsg( SCI_MARKERSETBACK,SC_MARKNUM_FOLDEROPEN,CLR_BLACK)
聽 聽::SendMsg( SCI_MARKERSETBACK,SC_MARKNUM_FOLDERSUB,CLR_BLACK)
聽 聽::SendMsg( SCI_MARKERSETBACK,SC_MARKNUM_FOLDERTAIL,CLR_BLACK) 聽
聽 聽::SetSavePoint()
return nil
I had to overwrite Setup method of TScintilla because it changes all setting every refresh :shock: