issue with canvases on stacked panels
BlitzPlus Forums/BlitzPlus Programming/issue with canvases on stacked panels| 
 | ||
| 
app=CreateWindow("CS_TBL does :(",0,0,640,480)
panel1=CreatePanel(4,4,256,256,app):SetPanelColor panel1,200,100,100
panel2=CreatePanel(64,64,256,256,app):SetPanelColor panel2,100,200,100
; try one canvas at a time, 1 or 2 ... it will work ok!
;
; then try both.. :(
;
canvas1=CreateCanvas(4,4,248,248,panel1)
;canvas2=CreateCanvas(4,4,248,248,panel2)
Repeat
	WaitEvent()
	If EventID()=$803 quit=True
Until quit
End
Is it a bug, or a feature? In both cases: can it work flawlessly? :) Idea is that one panel shows a (mapeditor-)map, the other shows (mapeditor-)tiles. And some key or $203/$205 event on the back-panel brings forth the backpanel, and vice versa.. | 
| 
 | ||
| I've found using canvases and panels to be quirky - often, mounting a canvas to a panel doesn't yeild the same results as attaching other gadgets to a panel. In my Map Editor, I use tabs - the panels are attached to the tabber, with buttons and so forth attached, while the canvases are attached to the tabber directly (NOT the panel). When a tabber is selected, I hide the relevant panel and canvas, then show the new panel and canvas. | 
| 
 | ||
| Well, for me canvases+panels work (did about 10+ mapeditors already, I've developed a knack for them :) ), except that these are layered.., to me it looks like a bug :) When it can't be fixed, I think I choose for completely layered panels, no things sticking out, and use a hotkey to quickly change between the two panels.. |