Well it was not planned all this and it delays us for the rest but ok why not

I think we need to simplify all this.
@ChrisR: In case of a panel gadget: Is Panel_ItemWidth, Panel_ItemHeight needed? Isn't it just parent width - 3 and parent height - 25 ?STARGÅTE wrote:As I can see, you want to use the images of PB gadget as object images, but for now you have no access to interact with this images (like clicking on the scroll bar or on a panel tab). Up to now I'm not sure how I/we can handle this without program the whole gadget itself, which is not the purpose of this include.
Would it help if I include an additional callback, which is called during the event handling? In this callback you would then have access to the local mouse cursor position and mouse events to check for clicks and hovers.
But how do you know the metrics/dimensions of the scrollbar or a tab in a panel gadget?
Code: Select all
If (GetWindowLongPtr_(GadgetID(Gadget), #GWL_STYLE) & #WS_VSCROLL) => GetSystemMetrics_(#SM_CXVSCROLL)
If (GetWindowLongPtr_(GadgetID(Gadget), #GWL_STYLE) & #WM_HSCROLL) => GetSystemMetrics_(#SM_CYHSCROLL)
Perfect!STARGÅTE wrote:Good point Paul. I fixed these issues now. Did it work for you?
For my part, I do not have the answer and Stargate knows better.STARGÅTE wrote:Should it be then possible to move an inner object over the border?
Same here: should it be then possible to move an inner object over this inner size border, or should it be blocked by the boundary?
Code: Select all
OpenWindow(0, 0, 0, 320, 240, "", #PB_Window_SystemMenu)
PanelGadget(0, 0, 0, 320, 240)
AddGadgetItem(0, -1, "Tab 1")
ButtonGadget(1, -20, -20, 100, 40, "MyButton1")
ButtonGadget(2, 240, 190, 100, 40, "MyButton2")
CloseGadgetList()
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Code: Select all
AddObjectFrame(Object, FrameIndex, ViewBoxX, ViewBoxY, ViewBoxWidth, ViewBoxHeight, InnerAreaX, InnerAreaY, InnerAreaWidth, InnerAreaHeight).
Code: Select all
AddObjectFrame(Object[, FrameIndex[, ViewBoxX, ViewBoxY, ViewBoxWidth, ViewBoxHeight[, InnerAreaX, InnerAreaY, InnerAreaWidth, InnerAreaHeight]]]).
Code: Select all
AddObjectFrame(Object, FrameIndex [, ViewBoxX, ViewBoxY, ViewBoxWidth, ViewBoxHeight [, InnerAreaWidth, InnerAreaHeight]])
Code: Select all
AddObjectFrame(Object[, FrameIndex[, ViewBoxX, ViewBoxY, ViewBoxWidth, ViewBoxHeight[, InnerAreaX, InnerAreaY, InnerAreaWidth, InnerAreaHeight]]])
Indeed, I had asked this too.ChrisR wrote:Unrelated!
An idea to mature for the future of your module, if you wish, would be to have the borders of one object that serve as boundaries for other objects with the overlap prohibited.
I am thinking for example of kitchen design tools