Thanks for your explanationts-soft wrote:This is for ignore both word in one line.ricardo wrote: 1.- What the purpose of "!wend" in RaEditAddDefBlock(#RaEdit,"while !wend", "wend", #BD_INCLUDELAST)?Code: Select all
While a : Wend
RaEditGadget Userlib
Code: Select all
SendMessage_(GadgetID(#RaEdit), #REM_SETCHARTAB, ';', #CT_NONE)
SendMessage_(GadgetID(#RaEdit), #REM_SETCHARTAB, '&', #CT_CMNTCHAR)
And this ?
Code: Select all
XIncludeFile #PB_Compiler_Home + "include\raedit.pb"
hwnd = OpenWindow(0,#PB_Ignore,#PB_Ignore,280,200,"")
CreateGadgetList(hwnd)
ra = RaEditGadget(0,0,0,280,200,0,0)
font = LoadFont(0,"courier new",10)
SetGadgetFont(0,font)
SetGadgetColor(0,#RAEdit_CommentColor,$0000FF)
SendMessage_(ra, #REM_SETCHARTAB, ';', #CT_NONE)
SendMessage_(ra, #REM_SETCHARTAB, '&', #CT_CMNTCHAR)
SetGadgetText(0,"blaaaaa &blaaaa")
Repeat
event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow
- cabaptista
- User

- Posts: 86
- Joined: Sun Nov 30, 2003 11:42 pm
- Location: Lisboa, Portugal
Hi ts-soft,
Two thinks for you to see (sorry if they were posted before):
1) When you create a new RaEdit object without Definition Blocks (but you don´t say explicitly that you don´t want them), run the code and click on collapse all button it crashes. In raedit.pb, procedure "_raedit_command_callback" you need to test "*RAData\BlockList" if it has something like this
2) When creating a RaEdit object with "#PB_Any" it crashes in raedit.pb, procedure "RaEditGadget" in (see comment)
Thanks in advance,
César Baptista
Two thinks for you to see (sorry if they were posted before):
1) When you create a new RaEdit object without Definition Blocks (but you don´t say explicitly that you don´t want them), run the code and click on collapse all button it crashes. In raedit.pb, procedure "_raedit_command_callback" you need to test "*RAData\BlockList" if it has something like this
Code: Select all
...
If *RAData\BlockList
ForEachObject(*RAData\BlockList ,*bd) ; pureobject.inc.pb
...
Code: Select all
...
If (id = #PB_Any)
*RaEdit\id = result
Else
*RaEdit\id = id
EndIf
RemoveKeyboardShortcut(*RaEdit\id, 9) ; CRASHES !!!!!!
SendMessage_(hwnd, #REM_TABWIDTH,2,1)
...
César Baptista
Thanks for the nice report, please download again.
http://www.realsource.de/downloads/doc_ ... editgadget
http://www.realsource.de/downloads/doc_ ... editgadget
panel gadget
Hi,
I love your control
I am trying to use your control in a panel gadget but i always get an error.
here is my code
editorform.pb
Thanks
Craig
I love your control
I am trying to use your control in a panel gadget but i always get an error.
here is my code
Code: Select all
XIncludeFile (#PB_Compiler_Home+"Include\raedit.pb")
IncludeFile "editor includes\editorform.pb"
Open_caspereditor()
Repeat ; Start of the event loop
Event = WaitWindowEvent() ; This line waits until an event is received from Windows
WindowID = EventWindow() ; The Window where the event is generated, can be used in the gadget procedures
GadgetID = EventGadget() ; Is it a gadget event?
EventType = EventType() ; The event type
If Event = #PB_Event_Gadget
EndIf
Until Event = #PB_Event_CloseWindow ; End of the event loop
End
Code: Select all
Enumeration
#caspereditorwin
#editorpanel
#RaEdit
EndEnumeration
Procedure Open_caspereditor()
If OpenWindow(#caspereditorwin, 228, 55,1024,768, "CPK Editor", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered )
If CreateGadgetList(WindowID(#caspereditorwin))
PanelGadget(#editorpanel,0,40,700,500)
AddGadgetItem(#editorpanel,-1,"New")
RaEditGadget(#RaEdit, 0,0,700,500)
RaEditAddDefBlock(#RaEdit,"procedure", "endprocedure", #BD_INCLUDELAST | #BD_DIVIDERLINE)
SetGadgetAttribute(#RaEdit, #RaEdit_HilightLine, #True)
SetGadgetAttribute(#RaEdit, #RaEdit_LineNumberBar, #True)
RaEditSetHiliteWords(#RaEdit,RGB(24, 130, 173),"procedure")
;CloseGadgetList()
EndIf
EndIf
EndProcedure
Craig
In the moment only a workaround:
Remove
at line 1412 - 1413? in raedit.pb
greetings
Thomas
Remove
Code: Select all
RemoveKeyboardShortcut(GetProp_(*Globals\CurrentWindow, "PB_WindowID")-1, 9)
SendMessage_(hwnd, #REM_TABWIDTH, 2, 1)greetings
Thomas
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.



