PB 5.20 - overlapping gadgets

You need some new stunning features ? Tell us here.
User_Russian
Addict
Addict
Posts: 1537
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

PB 5.20 - overlapping gadgets

Post 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
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PB 5.20 - overlapping gadgets

Post 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.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User_Russian
Addict
Addict
Posts: 1537
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: PB 5.20 - overlapping gadgets

Post by User_Russian »

IdeasVacuum wrote:pick the Container the Gadget belongs to.
Container is not activated.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PB 5.20 - overlapping gadgets

Post by IdeasVacuum »

...you pick the container from a list of gadgets that is presented, not from the graphics area 8)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply