Page 1 of 1

PB 5.20 - overlapping gadgets

Posted: Thu Oct 31, 2013 10:05 pm
by User_Russian
If the form there is gadgets (e.g., containers), which overlap each other, it becomes impossible to add gadgets to them.
Clicking on the gadget ID, the tab "Objects", the window "Form" does not activate the gadget.

Code: Select all

Enumeration FormWindow
  #Window_0
EndEnumeration

Enumeration FormGadget
  #Tree_0
  #Container_0
  #Text_0
  #Container_1
  #Text_1
EndEnumeration


Procedure OpenWindow_0(x = 0, y = 0, width = 600, height = 400)
  OpenWindow(#Window_0, x, y, width, height, "", #PB_Window_SystemMenu)
  HideWindow(#Window_0, 1)
  TreeGadget(#Tree_0, 8, 8, 120, 384)
  AddGadgetItem(#Tree_0, -1, "Container 1")
  AddGadgetItem(#Tree_0, -1, "Container 2")
  ContainerGadget(#Container_0, 136, 8, 456, 384)
  TextGadget(#Text_0, 88, 8, 120, 16, "Container 1")
  CloseGadgetList()
  ContainerGadget(#Container_1, 136, 8, 456, 384)
  TextGadget(#Text_1, 104, 32, 88, 16, "Container 2")
  CloseGadgetList()
EndProcedure

Procedure Window_0_Events(event)
  Select event
    Case #PB_Event_CloseWindow
      ProcedureReturn #False

    Case #PB_Event_Menu
      Select EventMenu()
      EndSelect

    Case #PB_Event_Gadget
      Select EventGadget()
      EndSelect
  EndSelect
  ProcedureReturn #True
EndProcedure

Re: PB 5.20 - overlapping gadgets

Posted: Thu Oct 31, 2013 10:30 pm
by IdeasVacuum
You do it like this - select the Gadget via the Objects List. In the Gadget's parameters list, select Parent - pick the Container the Gadget belongs to.

Re: PB 5.20 - overlapping gadgets

Posted: Fri Nov 01, 2013 8:46 am
by User_Russian
IdeasVacuum wrote:pick the Container the Gadget belongs to.
Container is not activated.

Re: PB 5.20 - overlapping gadgets

Posted: Fri Nov 01, 2013 5:44 pm
by IdeasVacuum
...you pick the container from a list of gadgets that is presented, not from the graphics area 8)