In the image below I showed:
1) In one line, I type 1 TAB (TAB size = 8 spaces on default)
2) In the second line I type 8 spaces
Why such a difference in levels, they have to level off?
---------------------------------------------
And the second question: why, after the reset IupSetAttribute(ih, "STYLECLEARALL", "Yes") , does not the backlighting appear?
Simple code from Joshy:
Code: Select all
#include "crt.bi"
#LibPath "."
#include once "IUP/iup.bi"
#include once "IUP/iup_scintilla.bi"
IupOpen(0,0)
IupScintillaOpen()
var ih = IupScintilla()
IupSetAttribute(ih, "STYLEFONT32", "Consolas")
IupSetAttribute(ih, "STYLEFONTSIZE32", "11")
IupSetAttribute(ih, "STYLECLEARALL", "Yes") ' Problem!!!!!!!!
IupSetAttribute(ih, "LEXERLANGUAGE", "freebasic")
IupSetAttribute(ih, "KEYWORDS0", "dim if print then var")
IupSetAttribute(ih, "STYLEFONT32", "Consolas")
IupSetAttribute(ih, "STYLEFONTSIZE32", "11")
' some styles
IupSetAttribute(ih, "STYLEFGCOLOR1", "0 160 0") ' comment
IupSetAttribute(ih, "STYLEFGCOLOR2", "0 160 160") ' number
IupSetAttribute(ih, "STYLEFGCOLOR3", "0 0 160") ' keywords
IupSetAttribute(ih, "STYLEFGCOLOR4", "160 0 0") ' string
IupSetAttribute(ih, "STYLEFGCOLOR6", "255 128 0") ' operator
IupSetAttribute(ih, "STYLEFGCOLOR7", "128 128 0") ' preprocessor
IupSetAttribute(ih, "STYLEFGCOLOR19", "128 128 128") ' block comment
IupSetAttribute(ih, "MARGINWIDTH0", "50")
IupSetAttribute(ih, "MARGINSENSITIVE1", "YES")
IupSetAttributes(ih,"EXPAND = YES")
IupSetAttribute(ih, "VALUE", !"' comment\nvar number = 123\nprint \"hello world\"\n#if 0\n nothing\n#endif\n/' block comment '/\n\if number >= 10 then print \">=10\"")
var dlg = IupDialog(ih)
IupSetAttributes( dlg, "TITLE = IupDialog, RASTERSIZE = 640x480" )
IupShow(dlg)
IupMainLoop()
IupClose()
P.S. I use the current version IUP. Tried on three OS, everywhere the result is unsatisfactory :(