On one of the windows there is a ListIconGadget which is set up when the window is created. Whenever I try to add information to that Listicongadget using the AddGadgetItem command I get the following error reported:
[ERROR] #Gadget not Initialized
The window setup was created using PurevisionXP (latest version). The window in defined in the file "DB_Windows.pb", the labels are Globallised in the file "DB_Constants.pb" - both created by Purevision.
Here are clips of the code.
"DB_Contants.pb"
Code: Select all
;Window_NewEntry1
Global Gadget_TFDB_Main_But_PrevEnt
Global Gadget_TFDB_Main_But_NewEnt
Global Gadget_TFDB_Main_But_EditEnt
Global Gadget_TFDB_Main_But_DelEnt
Global Gadget_TFDB_Main_But_NextEnt
Global Gadget_TFDB_Main_But_LastEnt
Global Gadget_TFDB_Main_But_FrstEnt
Global Gadget_NewEntry1_Text_SelChar
Global Gadget_NewEntry1_Char_Select
Global Gadget_NewEntry1_ANE1_Confirm
Global Gadget_NewEntry1_ANE1_Cancel
Global Gadget_NewEntry1_Image_TFDB1
Global Gadget_NewEntry1_Image_TFDB2
Code: Select all
Procedure.l Window_NewEntry1()
Window_NewEntry1=OpenWindow(#PB_Any,101,63,743,656,#PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_Invisible,"Add New Entry - Character Selection")
If Window_NewEntry1
If CreateGadgetList(WindowID(Window_NewEntry1))
Gadget_NewEntry1_Text_SelChar=TextGadget(#PB_Any,280,15,180,30,"Select Character",#PB_Text_Center|#PB_Text_Border)
PVDynamic_AddColorGadget(Gadget_NewEntry1_Text_SelChar,8388863,0)
SetGadgetFont(Gadget_NewEntry1_Text_SelChar,UseFont(LoadFont(#PB_Any,"Arial",14,260)))
Gadget_NewEntry1_Char_Select=ListIconGadget(#PB_Any,210,50,310,595,"Character",200,#PB_ListIcon_GridLines|#PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(Gadget_NewEntry1_Char_Select,1,"Series",100)
Gadget_NewEntry1_ANE1_Confirm=ButtonGadget(#PB_Any,625,615,85,25,"Confirm")
Gadget_NewEntry1_ANE1_Cancel=ButtonGadget(#PB_Any,25,615,85,25,"Cancel Entry")
Gadget_NewEntry1_Image_TFDB1=ImageGadget(#PB_Any,575,125,128,96,UseImage(Image_NewEntry1_Image_TFDB1))
Gadget_NewEntry1_Image_TFDB2=ImageGadget(#PB_Any,25,125,128,96,UseImage(Image_NewEntry1_Image_TFDB2))
HideWindow(Window_NewEntry1,0)
ProcedureReturn WindowID()
EndIf
EndIf
EndProcedure
"DB.pb"
Code: Select all
Case Gadget_DB_Main_But_NewEnt
If NE_Window_Open=0
NewEntry1(1)
For Count =1 To 28
Text$= Character (Count,1)+Chr(10)+Character (Count,2)
AddGadgetItem(Gadget_NewEntry1_Char_Select, -1, Text$)
Next Count
Window_NewEntry1()
NE_Window_Open=1
EndIf
Any help would be greatly received.
Andy



