gambas-source-code/comp/src/gb.form/ToolPanelContainer.class
Benoît Minisini ba19f3c1dd * Copy https://gambas.svn.sourceforge.net/svnroot/gambas/2.0 to https://gambas.svn.sourceforge.net/svnroot/gambas/gambas
git-svn-id: svn://localhost/gambas/trunk@893 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2007-12-30 16:41:49 +00:00

97 lines
1.4 KiB
Text

' Gambas class file
INHERITS UserControl
EVENT Change
PROPERTY Text AS String
PROPERTY TextFont AS Font
PROPERTY Picture AS Picture
'PROPERTY Enabled AS Boolean
PROPERTY Visible AS Boolean
PROPERTY READ Container AS Container
PRIVATE frmContainer AS FToolBar
PUBLIC SUB _new()
frmContainer = NEW FToolBar(ME)
ME._Container = frmContainer.GetContainer()
'Object.Attach(frmContainer, ME, "ToolBar")
END
PUBLIC FUNCTION GetButtonHeight() AS Integer
RETURN frmContainer.GetButtonHeight()
END
PRIVATE FUNCTION Text_Read() AS String
RETURN frmContainer.GetTitle()
END
PRIVATE SUB Text_Write(sText AS String)
frmContainer.SetTitle(sText)
END
PRIVATE FUNCTION Picture_Read() AS Picture
RETURN frmContainer.GetPicture()
END
PRIVATE SUB Picture_Write(hPict AS Picture)
frmContainer.SetPicture(hPict)
END
PUBLIC SUB _Change()
RAISE Change
END
PRIVATE FUNCTION Visible_Read() AS Boolean
RETURN SUPER.Visible
END
PRIVATE SUB Visible_Write(Value AS Boolean)
DIM hToolPanel AS ToolPanel
IF Value = SUPER.Visible THEN RETURN
SUPER.Visible = Value
hToolPanel = ME.Parent.Parent
hToolPanel.ToolPanel_Resize
END
PRIVATE FUNCTION TextFont_Read() AS Font
RETURN frmContainer.GetTextFont()
END
PRIVATE SUB TextFont_Write(Value AS Font)
frmContainer.SetTextFont(Value)
END
PRIVATE FUNCTION Container_Read() AS Container
RETURN frmContainer.GetContainer()
END