#!/usr/bin/env python
# -*- coding: utf-8 -*-
# generated by wxGlade 0.6.3 from "/home/ncq/Projekte/gm-git/gnumed/gnumed/client/wxg/wxgDrugComponentEAPnl.wxg"

import wx

# begin wxGlade: extracode
# end wxGlade



class wxgDrugComponentEAPnl(wx.ScrolledWindow):
    def __init__(self, *args, **kwds):

        from Gnumed.wxpython import gmMedicationWidgets
        from Gnumed.wxpython import gmMeasurementWidgets

        # begin wxGlade: wxgDrugComponentEAPnl.__init__
        kwds["style"] = wx.NO_BORDER|wx.TAB_TRAVERSAL
        wx.ScrolledWindow.__init__(self, *args, **kwds)
        self._TCTRL_brand = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY|wx.NO_BORDER)
        self._TCTRL_components = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY|wx.NO_BORDER)
        self._TCTRL_codes = wx.TextCtrl(self, -1, "", style=wx.TE_READONLY|wx.NO_BORDER)
        self._PRW_substance = gmMedicationWidgets.cSubstancePhraseWheel(self, -1, "", style=wx.NO_BORDER)
        self._TCTRL_amount = wx.TextCtrl(self, -1, "", style=wx.NO_BORDER)
        self._PRW_unit = gmMeasurementWidgets.cUnitPhraseWheel(self, -1, "", style=wx.NO_BORDER)

        self.__set_properties()
        self.__do_layout()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: wxgDrugComponentEAPnl.__set_properties
        self.SetScrollRate(10, 10)
        self._TCTRL_brand.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
        self._TCTRL_components.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
        self._TCTRL_codes.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_BACKGROUND))
        self._TCTRL_amount.SetToolTipString(_("The numeric amount of substance per dose in brand.\n\nExamples:\n- 100mg per tablet: amount = 100, unit = mg(/tablet)\n- 10mg/ampulla: amount = 10, unit = mg(/ampulla)\n- 5mg/ml solution: amount = 5, unit = mg/ml"))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: wxgDrugComponentEAPnl.__do_layout
        _gszr_main = wx.FlexGridSizer(5, 2, 1, 3)
        __szr_amount = wx.BoxSizer(wx.HORIZONTAL)
        __lbl_brand = wx.StaticText(self, -1, _("Brand"))
        _gszr_main.Add(__lbl_brand, 0, wx.ALIGN_CENTER_VERTICAL, 0)
        _gszr_main.Add(self._TCTRL_brand, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
        _gszr_main.Add((20, 20), 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
        _gszr_main.Add(self._TCTRL_components, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
        _gszr_main.Add((20, 20), 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
        _gszr_main.Add(self._TCTRL_codes, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
        __lbl_substance = wx.StaticText(self, -1, _("Substance"))
        __lbl_substance.SetForegroundColour(wx.Colour(255, 0, 0))
        _gszr_main.Add(__lbl_substance, 0, wx.ALIGN_CENTER_VERTICAL, 0)
        _gszr_main.Add(self._PRW_substance, 0, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 0)
        __lbl_amount = wx.StaticText(self, -1, _("Amount"))
        __lbl_amount.SetForegroundColour(wx.Colour(255, 0, 0))
        _gszr_main.Add(__lbl_amount, 0, wx.ALIGN_CENTER_VERTICAL, 0)
        __szr_amount.Add(self._TCTRL_amount, 1, wx.RIGHT|wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10)
        __lbl_unit = wx.StaticText(self, -1, _("Unit"))
        __lbl_unit.SetForegroundColour(wx.Colour(255, 0, 0))
        __szr_amount.Add(__lbl_unit, 0, wx.RIGHT|wx.ALIGN_CENTER_VERTICAL, 5)
        __szr_amount.Add(self._PRW_unit, 1, wx.EXPAND|wx.ALIGN_CENTER_VERTICAL, 10)
        _gszr_main.Add(__szr_amount, 1, wx.EXPAND, 0)
        self.SetSizer(_gszr_main)
        _gszr_main.Fit(self)
        _gszr_main.AddGrowableCol(1)
        # end wxGlade

# end of class wxgDrugComponentEAPnl


