Canvas Gadget - Option to be a Container
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Canvas Gadget - Option to be a Container
There are discussions and work-arounds on the forum about putting gadgets on top of a Canvas Gadget. It would be tremendous if the Canvas Gadget could optionally be flagged as being a Container.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Canvas Gadget - Option to be a Container
+1 - I have plenty of uses for this one !
HP Z800 Workstation
CPU : Dual Xeon 5690 3.46GHz
RAM : 96GB RAM ( 8GB x 12 )
PSU : 1100W
GPU : NVIDIA RTX 3050 8GB
STORAGE : 9TB
(4) 2TB Seagate IronWolf Pro HDD
(1) 1TB Samsung 870 EVO SSD
CPU : Dual Xeon 5690 3.46GHz
RAM : 96GB RAM ( 8GB x 12 )
PSU : 1100W
GPU : NVIDIA RTX 3050 8GB
STORAGE : 9TB
(4) 2TB Seagate IronWolf Pro HDD
(1) 1TB Samsung 870 EVO SSD
Re: Canvas Gadget - Option to be a Container
i use this code as workaround. works fine.
sorry for my bad english
Re: Canvas Gadget - Option to be a Container
The code is not complete. If you change the canvas cursor to let the user know visually which has focus, it fails after the string gadget gets focus.Josh wrote:i use this code as workaround. works fine.
Add -> SetGadgetAttribute(0,#PB_Canvas_Cursor, #PB_Cursor_Cross)
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: Canvas Gadget - Option to be a Container
I can't follow. If the cursor leave the stringgadget, the cursor change to mode, was before at the canvasgadget. In the example there is no use of the cross cursor.skywalk wrote:The code is not complete. If you change the canvas cursor to let the user know visually which has focus, it fails after the string gadget gets focus.
Add -> SetGadgetAttribute(0,#PB_Canvas_Cursor, #PB_Cursor_Cross)
sorry for my bad english
Re: Canvas Gadget - Option to be a Container
I'm saying the cursor always stays at IBeam which does not tell me if the stringgadget or canvasgadget has the focus?
And, if I change the canvasgadget cursor to Cross initially, it still does not respect that cursor in your callback.
And, if I change the canvasgadget cursor to Cross initially, it still does not respect that cursor in your callback.
Code: Select all
If OpenWindow(0, 0, 0, 220, 220, "CanvasGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget(0, 10, 10, 200, 200, #PB_Canvas_Keyboard|#PB_Canvas_DrawFocus)
SetGadgetAttribute (0, #PB_Canvas_Cursor, #PB_Cursor_Cross) ;<-- Add this and no respect...
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Re: Canvas Gadget - Option to be a Container
Ok, the problem was, that there is no automatic WM_MOUSELEAVE event, if XP skin support is disabled. I added the function TrackMouseEvent, so that the WM_MOUSELEAVE event is send in each case. code in german forum corrected.skywalk wrote:I'm saying the cursor always stays at IBeam which does not tell me if the stringgadget or canvasgadget has the focus?
And, if I change the canvasgadget cursor to Cross initially, it still does not respect that cursor in your callback.
sorry for my bad english
Re: Canvas Gadget - Option to be a Container
Very nice 

The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum