Restored from previous forum. Originally posted by tinman.
I think tinman is talking about changing the Tab Control Styles, like putting the tabs on the bottom instead of the top which is the default. Of course you are looking at API specific stuff now.
No, I was talking about changing the colour of the frame - it seems I had misunderstood what panel gadgets were for, as I did not realise it had anything to do with tab pages (great description in the PB manual :/ ).
OK, so now I know I should definately be using frame gadgets (as I really do only want a frame round them), and I now have some code which shows the bugs I mentioned:
Code: Select all
If Initgadget(10)=0 : End : EndIf
If OpenWindow(0, 100, 300, 500, 300, #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_SizeGadget, "Layout Test")
If CreateGadgetList(WindowID())
PanelGadget(0, 0, 0, 150, 60)
ButtonGadget(1, 10, 10, 100, 20, "??")
ClosePanelGadget()
Frame3DGadget(2, 160, 0, 90, 60, "", 0)
Frame3DGadget(3, 260, 0, 90, 60, "", 1)
Frame3DGadget(4, 360, 0, 90, 60, "", 2)
ButtonGadget(5, 166, 6, 78, 20, "A")
ButtonGadget(6, 266, 6, 78, 20, "B")
ButtonGadget(7, 366, 6, 78, 20, "C")
EndIf
StartDrawing(WindowOutput())
FrontColor(255, 0, 0)
Line(0, 0, 500, 0)
StopDrawing()
; Main window loop
quit.w=0
While quit=0
ev.l=WaitWindowEvent()
Select ev
Case #PB_EventCloseWindow
quit=1
Case #PB_EventRepaint
StartDrawing(WindowOutput())
FrontColor(255, 0, 0)
Line(0, 0, 500, 0)
StopDrawing()
EndSelect
Wend
CloseWindow(0)
EndIf
End
The buttons shows in the first frame (normal edges) but not in the second or third (double and single sunken respectively). I don't see why my code would be broken, since it works for the first frame.
Also, the normal frame's top edge is drawn six pixels below the position I specify. There's a screengrab on my homepage
http://www.david-mcminn.co.uk
This is all in Win98.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.