Hi marcoagpinto,
Sometimes you just need to slow down, take a breath and review your code.
You're missing the
Flags parameter before the
ParentID parameter.
• Also resolves your EditorGadget hiccup; don't be sad
Code: Select all
#WINDOW_MAIN=1
#WINDOW_ADD_EDIT=2
#WINDOW_FLAGS_DESCRIPTION=3
#WINDOW_FLAGS_DESCRIPTION_EDITOR_GADGET=4
OpenWindow(#WINDOW_MAIN,0,0,100,100,"Main window",#PB_Window_SystemMenu|#PB_Window_WindowCentered)
w=(1024-800)+(800-640)+640-10
h=200-50-20-20+100+100+200-30-30-30+10+120+10
OpenWindow(#WINDOW_ADD_EDIT,0,0,w,h,"Add a word",#PB_Window_SystemMenu|#PB_Window_WindowCentered,WindowID(#WINDOW_MAIN))
w=WindowWidth(#WINDOW_ADD_EDIT)/2
h=WindowHeight(#WINDOW_ADD_EDIT)
x=WindowX(#WINDOW_ADD_EDIT)+w
y=WindowY(#WINDOW_ADD_EDIT)
OpenWindow(#WINDOW_FLAGS_DESCRIPTION,x,y,w,h,"Display flags description",#PB_Window_SystemMenu,WindowID(#WINDOW_ADD_EDIT))
OldGadgetList = UseGadgetList(WindowID(#WINDOW_FLAGS_DESCRIPTION))
EditorGadget(#WINDOW_FLAGS_DESCRIPTION_EDITOR_GADGET,10,10,100,100,#PB_Editor_ReadOnly)
UseGadgetList(OldGadgetList)
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_CloseWindow
Select EventWindow()
Case #WINDOW_MAIN : Break
Case #WINDOW_ADD_EDIT : CloseWindow(#WINDOW_ADD_EDIT)
Case #WINDOW_FLAGS_DESCRIPTION : CloseWindow(#WINDOW_FLAGS_DESCRIPTION)
EndSelect
EndSelect
ForEver