|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Mirc styled interface
I need a little idea on how to make 2 text box in wxPython
I need a window like this: Code:
++++++++++++++++ | | | | <--- Multiline text area | | ++++++++++++++++ | | <-- Single line text area ++++++++++++++++ - both text are must filled the entire frame when maximize - The bottom text are must stay the same size(single line) whether it's maximise or not. I need something like MIRC interface. Thank. Last edited by flixxer : May 7th, 2004 at 09:25 AM. |
|
#2
|
|||
|
|||
|
You can do this quite easily using sizers.
I generally use wxGlade to design GUIs like this - it will let you play around with the layout and try out different options. It took me a couple of minutes to get it to generate the following: Code:
#!/usr/bin/env python
# generated by wxGlade 0.3.2 on Fri May 07 19:28:38 2004
import wx
class MyFrame(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrame.__init__
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwds)
self.text_ctrl_1 = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE)
self.text_ctrl_2 = wx.TextCtrl(self, -1, "")
self.__set_properties()
self.__do_layout()
# end wxGlade
def __set_properties(self):
# begin wxGlade: MyFrame.__set_properties
self.SetTitle("frame_1")
self.text_ctrl_1.SetSize((392, 300))
# end wxGlade
def __do_layout(self):
# begin wxGlade: MyFrame.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer_1.Add(self.text_ctrl_1, 0, wx.EXPAND, 0)
sizer_1.Add(self.text_ctrl_2, 0, wx.EXPAND, 0)
self.SetAutoLayout(1)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
sizer_1.SetSizeHints(self)
self.Layout()
# end wxGlade
# end of class MyFrame
Dave - The Developers' Coach |
|
#3
|
|||
|
|||
|
I used Boa, maybe I'll try playing more with it.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Mirc styled interface |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|