Aaargh, I'm about to pull out all of my hair! No matter what alignment settings I use for SetGadgetLayout() I'm unable to make a textarea inside a tabber auto resize to the size of the tabber. I'm using BlitzMax 1.37 and MaxGUI 1.36 (recompiled with bmx 1.37).
It must be something really stupid but I can't figure it out. When not inside a tabber it works fine.
Here's the code. (*** about to become mental ***)
'Source Code created on 23 Jan 2010 00:16:17 with Logic Gui Version 5.1 Build 422
'John Doe
'Start of external Header File
SuperStrict
Import MaxGui.Drivers
'?Not win32 'Uncomment (3-lines) when using multiple canvases and BMax 1.32b and up
'GLShareContexts
'?
'End Of external Header File
Local Window1:TGadget = CreateWindow("Window1",604,138,456,436,Null,WINDOW_TITLEBAR|WINDOW_RESIZABLE |WINDOW_STATUS |WINDOW_CENTER)
SetGadgetLayout( Window1,EDGE_ALIGNED,EDGE_RELATIVE,EDGE_ALIGNED,EDGE_RELATIVE )
Local Tabber1:TGadget = CreateTabber(0,0,448,382,Window1,Null)
SetGadgetLayout( Tabber1,EDGE_ALIGNED,EDGE_RELATIVE,EDGE_ALIGNED,EDGE_RELATIVE )
Local Tabber1_Tab1:TGadget = CreatePanel( 0,0,ClientWidth(Tabber1),ClientHeight(Tabber1),Tabber1 )
AddGadgetItem( Tabber1,"Tabber1" )
Tabber1.items[0].extra = Tabber1_Tab1
Local TextArea3:TGadget = CreateTextArea(0,0,444,360,Tabber1_Tab1,Null)
SetGadgetLayout( TextArea3,EDGE_ALIGNED,EDGE_RELATIVE,EDGE_ALIGNED,EDGE_RELATIVE )
SetTextAreaText( TextArea3 , "TextArea3" )
Repeat
WaitEvent()
Select EventID()
Case EVENT_WINDOWCLOSE
Select EventSource()
Case Window1 Window1_WC( Window1 )
End Select
Case EVENT_GADGETACTION
Select EventSource()
Case Tabber1 Tabber1_GA( Tabber1 , EventData() )
Case TextArea3 TextArea3_GA( TextArea3 )
End Select
End Select
Forever
Function Window1_WC( Window:TGadget )
DebugLog "Window Window1 wants to be closed"
End
End Function
Function Tabber1_GA( Tabber:TGadget , Number:Int )
DebugLog "Tabber Tabber1 selected Tab " + Number
For Local i:Int = 0 To Tabber.items.length -1
HideGadget( TGadget( Tabber.items[i].extra ) )
Next
ShowGadget( TGadget( Tabber.items[Number].extra ) )
End Function
Function TextArea3_GA( TextArea:TGadget )
DebugLog "TextArea TextArea3 was modified"
End Function
|