TextCtrl and ENTER key

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

TextCtrl and ENTER key

bino oetomo
Dear All ..

I have lines :

         self.text_ctrl_1 = wx.TextCtrl(self.panel_1, -1, "",
style=wx.TE_PROCESS_ENTER)
         self.text_ctrl_2 = wx.TextCtrl(self.panel_1, -1, "")

When I try to type "jjj" in text_ctrl_1 and press the ENTER button on my
keyboard ... the cursor stay at that box.
Is it normal behavior ?
If so .. how to make it to :
++ call some procedure , and
++ move to next / other-choosen control widget

Kindly please give me any of your enlightment

Sincerely
-bino-
Argh .. I realy miss the age of FoxPro 2.5

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: TextCtrl and ENTER key

werner
On 09/14/2011 10:31 AM, bino oetomo wrote:

> Dear All ..
>
> I have lines :
>
>         self.text_ctrl_1 = wx.TextCtrl(self.panel_1, -1, "",
> style=wx.TE_PROCESS_ENTER)
>         self.text_ctrl_2 = wx.TextCtrl(self.panel_1, -1, "")
>
> When I try to type "jjj" in text_ctrl_1 and press the ENTER button on
> my keyboard ... the cursor stay at that box.
> Is it normal behavior ?
Yes, see:
http://xoomer.virgilio.it/infinity77/wxPython/Widgets/wx.TextCtrl.html

wx.TE_PROCESS_ENTER The control will generate the event
wx.wxEVT_COMMAND_TEXT_ENTER (otherwise pressing Enter key is either
processed internally by the control or used for navigation between
dialog controls).

> If so .. how to make it to :
> ++ call some procedure , and
> ++ move to next / other-choosen control widget
In your event handler for TE_PROCESS_ENTER when ever you are done you
need to call

http://xoomer.virgilio.it/infinity77/wxPython/Widgets/wx.Window.html#Navigate

>
> Kindly please give me any of your enlightment
>
> Sincerely
> -bino-
> Argh .. I realy miss the age of FoxPro 2.5
>
I am pretty sure that will soon pass:-)

Werner

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Survey: what editor are you using and why

Tobias Weber
It's been asked repeatedly over the last couple of years but from what I
can read from the list archives it's been a while so I am interested
what has changed over the past 3 years ...

Simple quick questions .. in case we get a ot of replies I am willing to
put it all 2gether online ....

1:
What platforms are u coding on?


2:
What target platforms are you coding for?

4:
What languages other than python/ wx.python are you coding in on a
regular basis (ranking from most-1 to least-10 .... )?


5:
Is python the main language u are using?

6:
What language are you coming from?


7:
What editors are you using for python and wx.python?

8:
What other editors have u used and why did u switch?

9:
What other GUI Toolkits are u using and why?

10:
Is most of your programming:
- private
- open source
- commercial
- sthg. I did not think of ...

11:
Are you actively involved in open source projects? If YES in what?

12:
(Taken into account other GUI Toolkits experience) What are your top3
widgets/ features and what are the 3 most annoying things in wx.python?




Thanks for your conribution


Cheers,

T

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Survey: what editor are you using and why

Tobias Weber
In reply to this post by werner
It's been asked repeatedly over the last couple of years but from what I
can read from the list archives it's been a while so I am interested
what has changed over the past 3 years ...

Simple quick questions .. in case we get a ot of replies I am willing to
put it all 2gether online ....

1:
What platforms are u coding on?


2:
What target platforms are you coding for?

4:
What languages other than python/ wx.python are you coding in on a
regular basis (ranking from most-1 to least-10 .... )?


5:
Is python the main language u are using?

6:
What language are you coming from?


7:
What editors are you using for python and wx.python?

8:
What other editors have u used and why did u switch?

9:
What other GUI Toolkits are u using and why?

10:
Is most of your programming:
- private
- open source
- commercial
- sthg. I did not think of ...

11:
Are you actively involved in open source projects? If YES in what?

12:
(Taken into account other GUI Toolkits experience) What are your top3
widgets/ features and what are the 3 most annoying things in wx.python?




Thanks for your conribution


Cheers,

T

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: Survey: what editor are you using and why

Bryan Oakley-2
In reply to this post by Tobias Weber


On Sep 14, 2011, at 6:46 AM, Tobias Weber <[hidden email]> wrote:

> It's been asked repeatedly over the last couple of years but from what I
> can read from the list archives it's been a while so I am interested
> what has changed over the past 3 years ...
>
> Simple quick questions .. in case we get a ot of replies I am willing to
> put it all 2gether online ....
>
> 1:
> What platforms are u coding on?
>

Presently, windows 7. For the previous  three years, mac and linux. Prior to that, mostly linux.

> 2:
> What target platforms are you coding for?

Mac, windows, linux

> 4:
> What languages other than python/ wx.python are you coding in on a
> regular basis (ranking from most-1 to least-10 .... )?

Tcl, 5
Bash, 5
C#, 9

> 5:
> Is python the main language u are using?

Yes, for the past three years.

> 6:
> What language are you coming from?

Tcl, C, java, and waaaay before that, fortran and perl. Mostly tcl since '96 or so.

> 7:
> What editors are you using for python and wx.python?

Emacs

> 8:
> What other editors have u used and why did u switch?

Emacs for the past 20+ years. Why switch? Though, I used vi for a couple years before that. Presently I'm using Visual Studio. It's painful :-/

My advice on editors? Learn either vim or emacs well, and you'll never have to switch editors again.

> 9:
> What other GUI Toolkits are u using and why?

Tk with tcl, tkinter with python. Why? It's incredibly easy to use, powerful, cross platform, seemless unicode support, rock solid. The canvas and text widgets are remarkably powerful. It's method of implementing bindings is second to none. The geometry managers are very well designed and easy to use. Its interactive mode is easier than with python.

> 10:
> Is most of your programming:
> - private
> - open source
> - commercial
> - sthg. I did not think of ...

Lately, most has either been in-house tools and open source. I've done plenty of commercial apps in tcl/tk, none in python.

> 11:
> Are you actively involved in open source projects? If YES in what?

Yes. Presently, a contributor to robotframework-ride and robotframework-seleniumlib,  plus my own project robotframework-workbench (all on google code). I wrote a combobox widget for tcl/tk which was very popular for many years before tk got a native one. I contributed most of the UI code to tkdiff many years ago. I've contributed thousands of lines of code snippets in various forums and mailing lists. There have been a few other tcl related projects I've contributed to.

> 12:
> (Taken into account other GUI Toolkits experience) What are your top3
> widgets/ features and what are the 3 most annoying things in wx.python?
>

Right now the AUI stuff is my favorite part of wxpython. I like the demo that comes with wxpython. The tree controls are very nice.

Most annoying features? It seems to crash a lot for me during development. I think the way events are bound to be relatively weak and inflexible (compared to tk). The sometimes spotty documemtation can be very frustrating.

>

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: Survey: what editor are you using and why

werner
In reply to this post by Tobias Weber
On 09/14/2011 01:47 PM, Tobias Weber wrote:
> It's been asked repeatedly over the last couple of years but from what I
> can read from the list archives it's been a while so I am interested
> what has changed over the past 3 years ...
>
> Simple quick questions .. in case we get a ot of replies I am willing to
> put it all 2gether online ....
>
> 1:
> What platforms are u coding on?
Mostly Windows 7, lately started to work on Ubuntu
>
> 2:
> What target platforms are you coding for?
Windows, but would like to get to port to Ubuntu/Linux and Mac
> 4:
> What languages other than python/ wx.python are you coding in on a
> regular basis (ranking from most-1 to least-10 .... )?
>
Non
> 5:
> Is python the main language u are using?
Yes
> 6:
> What language are you coming from?
>
Only other experience was a long time ago with RPG II (IBM System s/34
and s/36 and under HP-UX using Unibol)
> 7:
> What editors are you using for python and wx.python?
Boa Constructor but lately using Editra quit a bit
> 8:
> What other editors have u used and why did u switch?
Boa is starting to date a bit, but still like its integrated help and
the debugger.

Editra has better code completion then Boa.

Tried but never switched to them:
Eric 4 - a bit too slow, to QT oriented and didn't like its project handling
Eclipse/pyDev - very slow startup, didn't liked its project handling
Ulipad - don't remember why it never convinced me
Wing - very nice but can't justify the Euros at this point (not that it
is expensive but doing all this as a hobby and try to keep the expenses
as much down as is possible).
> 9:
> What other GUI Toolkits are u using and why?
None
> 10:
> Is most of your programming:
> - private
> - open source
> - commercial
> - sthg. I did not think of ...
Hobby, shareware
> 11:
> Are you actively involved in open source projects? If YES in what?
Not as much as I should.  Helping out with Boa support.
> 12:
> (Taken into account other GUI Toolkits experience) What are your top3
> widgets/ features and what are the 3 most annoying things in wx.python?
widgets:
wx.lib.agw.aui
objectlistview - http://objectlistview.sourceforge.net/python/index.html
wx.lib.sized_controls

dislikes/problems/annoying:
documentation
no sqlalchemy data aware widgets
no mobile port (android, iphone)

other likes:
great support by Robin and others via this list

Werner

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

set cursor position in an entry field

Tobias Weber
I cannot find documentation on setting the cursor position in an entry
field.
Currently i am prefilling fomrs and dialogs to be completed by the user,
i.e. I preset the text in the entry to be sthg and want the user to add
their share at THE END of what I prefilled.
How can I set the entry cursor to be ath the end or asome arbitrary
position?

Example:
dlg = wx.TextEntryDialog(
            self, u'add at the end of prefilled text',
            'Add to the text', 'Python')
dlg.SetValue("Kalkulaton-")

Thanks

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: set cursor position in an entry field

werner
Hi Tobias,

On 09/14/2011 03:46 PM, Tobias Weber wrote:

> I cannot find documentation on setting the cursor position in an entry
> field.
> Currently i am prefilling fomrs and dialogs to be completed by the user,
> i.e. I preset the text in the entry to be sthg and want the user to add
> their share at THE END of what I prefilled.
> How can I set the entry cursor to be ath the end or asome arbitrary
> position?
>
> Example:
> dlg = wx.TextEntryDialog(
>              self, u'add at the end of prefilled text',
>              'Add to the text', 'Python')
> dlg.SetValue("Kalkulaton-")
>
Never used TextEntryDialog but in a TextCtrl you could do:

SetInsertionPointEnd ()

And if user then doesn't change the insertion point manually he/she will
type/add at the end.

Werner

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: set cursor position in an entry field

Tobias Weber
Am 14.09.11 16:32, schrieb werner:
> SetInsertionPointEnd ()
Thanks- this sure works for a TextEntry but not for a TextEntryDialog
... :-( ... not really concise ...

--
--------------------------------------------------
Tobias Weber
CEO

The ROG Corporation GmbH
Donaustaufer Str. 200
93059 Regensburg
Tel: +49 941 4610 57 55
Fax: +49 941 4610 57 56

www.roglink.com

GeschŠftsfŸhrer: Tobias Weber
Registergericht: Amtsgericht Regensburg - HRB 8954
UStID DE225905250 - Steuer-Nr.184/59359
--------------------------------------------------

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: set cursor position in an entry field

Cody Precord
Hi,

On Wed, Sep 14, 2011 at 10:49 AM, Tobias Weber <[hidden email]> wrote:
> Am 14.09.11 16:32, schrieb werner:
>> SetInsertionPointEnd ()
> Thanks- this sure works for a TextEntry but not for a TextEntryDialog
> ... :-( ... not really concise ...
>

The TextEntryDialog is a class that is composed of a Dialog,
StaticText labels, Buttons, and TextCtrl contained in it. You should
be able to gain access to the TextCtrl using the dialogs Children
list.

d = wx.TextEntryDialog(...)
for child in d.Children:
    if isinstance(child, wx.TextCtrl):
        child.SetInsertionPoint(position_you_want)
        break

Regards,

Cody

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

AGW AUI -- AUI_Notebook - sizers/ page layout of tabs missing examples etc

Tobias Weber
In reply to this post by Tobias Weber
I cannot find any examples that demonstrate "complete" page layouts of
tabs in an AUI Notebook.
What I wanna do:
I want to user sizers etc to be able to be in full control of tab page
layout, i.e. gridsizer, boxsizer etc.

So for here I want to pack 2 static boxes (wx.StaticBox )into a sizer
(wx.BoxSizer)
My problem seems to be that I need a panel in my tab to which I can add
my wx.BoxSizer, but I cannot find any examples that use panels on
notebook tabs ....

I am using here the code from wx.PythonDemo AGW AUI as foundation,
jumping in from about line 3050.



# add a new tab
def OnNewTab(self, event):

    auibook = self._mgr.GetPane("notebook_content").window
    box1 = wx.StaticBox(self, -1, 'box1')
    box = wx.StaticBox(auibook, -1, 'new box')
    auibook.AddPage(box, 'new tab')



ThanX

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: Survey: what editor are you using and why

Anthony Floyd-2
In reply to this post by Tobias Weber
Inline responses:

On Wed, Sep 14, 2011 at 4:46 AM, Tobias Weber <[hidden email]> wrote:
> It's been asked repeatedly over the last couple of years but from what I
> can read from the list archives it's been a while so I am interested
> what has changed over the past 3 years ...
>
> Simple quick questions .. in case we get a ot of replies I am willing to
> put it all 2gether online ....
>
> 1:
> What platforms are u coding on?

Win XP/7 32/64 bit, Ubuntu 32/64 bit

>
> 2:
> What target platforms are you coding for?
>

Win XP/7 32/64 bit, Ubuntu 32/64 bit

> 4:
> What languages other than python/ wx.python are you coding in on a
> regular basis (ranking from most-1 to least-10 .... )?

Fortran
C
C++
(bash)

> 5:
> Is python the main language u are using?

50/50 Python/Fortran

> 6:
> What language are you coming from?
>

Fortran/C

> 7:
> What editors are you using for python and wx.python?

WingIDE Pro 4

>
> 8:
> What other editors have u used and why did u switch?
>

Too many to count. Love Wing for its autocomplete, debugging, source
assistant, interface

> 9:
> What other GUI Toolkits are u using and why?
>

None

> 10:
> Is most of your programming:
> - private
> - open source
> - commercial
> - sthg. I did not think of ...
>

Commercial

> 11:
> Are you actively involved in open source projects? If YES in what?
>

No

> 12:
> (Taken into account other GUI Toolkits experience) What are your top3
> widgets/ features and what are the 3 most annoying things in wx.python?
>

Andrea's AUI widgets are all great. Sizers are a blessing and a curse.

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: Survey: what editor are you using and why

Dietmar Schwertberger-2
In reply to this post by Tobias Weber
Am 14.09.2011 13:46, schrieb Tobias Weber:
> It's been asked repeatedly over the last couple of years but from what I
> can read from the list archives it's been a while so I am interested
> what has changed over the past 3 years ...
>
> Simple quick questions .. in case we get a ot of replies I am willing to
> put it all 2gether online ....
>
> 1:
> What platforms are u coding on?
Win 7
>
>
> 2:
> What target platforms are you coding for?
Win 7, Win XP
Maemo

> 4:
> What languages other than python/ wx.python are you coding in on a
> regular basis (ranking from most-1 to least-10 .... )?
C (for Python extension modules and for microcontrollers)
Visual BASIC (for legacy applications developed by other people)

>
>
> 5:
> Is python the main language u are using?
Sure
>
> 6:
> What language are you coming from?
C/C++, BASIC, Pascal, Forth, PERL
Actually, I found Python when I just had learned PERL and never looked
back...
>
>
> 7:
> What editors are you using for python and wx.python?
Wing IDE; sometimes Pythonwin
>
> 8:
> What other editors have u used and why did u switch?
Pythonwin
Wing is a great IDE; excellent debugger
>
> 9:
> What other GUI Toolkits are u using and why?
Qt / PySide; for use on my mobile phone (running under Maemo)
>
> 10:
> Is most of your programming:
> - private
> - open source
> - commercial
> - sthg. I did not think of ...
In my spare time for use at work.
At work for in-house use.
Private
>
> 11:
> Are you actively involved in open source projects? If YES in what?
No
>
> 12:
> (Taken into account other GUI Toolkits experience) What are your top3
> widgets/ features and what are the 3 most annoying things in wx.python?
Plus:
  - It has been working fine all the years (started using in 2000)
  - very good support
  - PyShell
Minus:
  - Grid: outdated, lack of features
   (e.g. I would need column headers spanning multiple columns)
  - never liked the event system; have always used my own wrappers
  - lack of vertical text for buttons and labels

>
>
>
>
> Thanks for your conribution
>
>
> Cheers,
>
> T
>


--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: AGW AUI -- AUI_Notebook - sizers/ page layout of tabs missing examples etc

werner
In reply to this post by Tobias Weber
On 09/14/2011 06:21 PM, Tobias Weber wrote:

> I cannot find any examples that demonstrate "complete" page layouts of
> tabs in an AUI Notebook.
> What I wanna do:
> I want to user sizers etc to be able to be in full control of tab page
> layout, i.e. gridsizer, boxsizer etc.
>
> So for here I want to pack 2 static boxes (wx.StaticBox )into a sizer
> (wx.BoxSizer)
> My problem seems to be that I need a panel in my tab to which I can add
> my wx.BoxSizer, but I cannot find any examples that use panels on
> notebook tabs ....
>
> I am using here the code from wx.PythonDemo AGW AUI as foundation,
> jumping in from about line 3050.
>
>
>
> # add a new tab
> def OnNewTab(self, event):
>
>      auibook = self._mgr.GetPane("notebook_content").window
>      box1 = wx.StaticBox(self, -1, 'box1')
>      box = wx.StaticBox(auibook, -1, 'new box')
>      auibook.AddPage(box, 'new tab')
>
>
>

I think the following should do - untested

auibook = self._mgr.GetPane("notebook_content").window
panel = wx.Panel(auibook)
box = wx.StaticBox(panel, -1, 'new box')
auibook.AddPage(panel, 'new tab')


Werner

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: AGW AUI -- AUI_Notebook - sizers/ page layout of tabs missing examples etc

Tobias Weber
Am 14.09.11 20:43, schrieb werner:

> On 09/14/2011 06:21 PM, Tobias Weber wrote:
>> I cannot find any examples that demonstrate "complete" page layouts of
>> tabs in an AUI Notebook.
>> What I wanna do:
>> I want to user sizers etc to be able to be in full control of tab page
>> layout, i.e. gridsizer, boxsizer etc.
>>
>> So for here I want to pack 2 static boxes (wx.StaticBox )into a sizer
>> (wx.BoxSizer)
>> My problem seems to be that I need a panel in my tab to which I can add
>> my wx.BoxSizer, but I cannot find any examples that use panels on
>> notebook tabs ....
>>
>> I am using here the code from wx.PythonDemo AGW AUI as foundation,
>> jumping in from about line 3050.
>>
>>
>>
>> # add a new tab
>> def OnNewTab(self, event):
>>
>> auibook = self._mgr.GetPane("notebook_content").window
>> box1 = wx.StaticBox(self, -1, 'box1')
>> box = wx.StaticBox(auibook, -1, 'new box')
>> auibook.AddPage(box, 'new tab')
>>
>>
>>
>
> I think the following should do - untested
>
> auibook = self._mgr.GetPane("notebook_content").window
> panel = wx.Panel(auibook)
> box = wx.StaticBox(panel, -1, 'new box')
> auibook.AddPage(panel, 'new tab')
>
>
> Werner
>
That's what I thought, too- but the prob ist that this panel is outside
the tab then, i.e. pper left corner of the notebook's panel ...


--
--------------------------------------------------
Tobias Weber
CEO

The ROG Corporation GmbH
Donaustaufer Str. 200
93059 Regensburg
Tel: +49 941 4610 57 55
Fax: +49 941 4610 57 56

www.roglink.com

GeschŠftsfŸhrer: Tobias Weber
Registergericht: Amtsgericht Regensburg - HRB 8954
UStID DE225905250 - Steuer-Nr.184/59359
--------------------------------------------------

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: AGW AUI -- AUI_Notebook - sizers/ page layout of tabs missing examples etc

Andrea Gavana
Hi,

On 14 September 2011 21:57, Tobias Weber  wrote:
Am 14.09.11 20:43, schrieb werner:
> On 09/14/2011 06:21 PM, Tobias Weber wrote:
>> I cannot find any examples that demonstrate "complete" page layouts of
>> tabs in an AUI Notebook.
>> What I wanna do:
>> I want to user sizers etc to be able to be in full control of tab page
>> layout, i.e. gridsizer, boxsizer etc.
>>
>> So for here I want to pack 2 static boxes (wx.StaticBox )into a sizer
>> (wx.BoxSizer)
>> My problem seems to be that I need a panel in my tab to which I can add
>> my wx.BoxSizer, but I cannot find any examples that use panels on
>> notebook tabs ....
>>
>> I am using here the code from wx.PythonDemo AGW AUI as foundation,
>> jumping in from about line 3050.
>>
>>
>>
>> # add a new tab
>> def OnNewTab(self, event):
>>
>> auibook = self._mgr.GetPane("notebook_content").window
>> box1 = wx.StaticBox(self, -1, 'box1')
>> box = wx.StaticBox(auibook, -1, 'new box')
>> auibook.AddPage(box, 'new tab')
>>
>>
>>
>
> I think the following should do - untested
>
> auibook = self._mgr.GetPane("notebook_content").window
> panel = wx.Panel(auibook)
> box = wx.StaticBox(panel, -1, 'new box')
> auibook.AddPage(panel, 'new tab')
>
>
> Werner
>
That's what I thought, too- but the prob ist that this panel is outside
the tab then, i.e. pper left corner of the notebook's panel ...


This is not possible. Please provide a small runnable sample demonstrating the problem, platform and wxPython version, and whether you are using AGW from SVN. 


Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

>>> import PyQt4.QtGui
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ImportError: No module named PyQt4.QtGui
>>>
>>> import pygtk
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ImportError: No module named pygtk
>>> 
>>> import wx
>>>
>>>

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: AGW AUI -- AUI_Notebook - sizers/ page layout of tabs missing examples etc

Tobias Weber
Am 14.09.11 21:00, schrieb Andrea Gavana:
Hi,

On 14 September 2011 21:57, Tobias Weber  wrote:
Am 14.09.11 20:43, schrieb werner:
> On 09/14/2011 06:21 PM, Tobias Weber wrote:
>> I cannot find any examples that demonstrate "complete" page layouts of
>> tabs in an AUI Notebook.
>> What I wanna do:
>> I want to user sizers etc to be able to be in full control of tab page
>> layout, i.e. gridsizer, boxsizer etc.
>>
>> So for here I want to pack 2 static boxes (wx.StaticBox )into a sizer
>> (wx.BoxSizer)
>> My problem seems to be that I need a panel in my tab to which I can add
>> my wx.BoxSizer, but I cannot find any examples that use panels on
>> notebook tabs ....
>>
>> I am using here the code from wx.PythonDemo AGW AUI as foundation,
>> jumping in from about line 3050.
>>
>>
>>
>> # add a new tab
>> def OnNewTab(self, event):
>>
>> auibook = self._mgr.GetPane("notebook_content").window
>> box1 = wx.StaticBox(self, -1, 'box1')
>> box = wx.StaticBox(auibook, -1, 'new box')
>> auibook.AddPage(box, 'new tab')
>>
>>
>>
>
> I think the following should do - untested
>
> auibook = self._mgr.GetPane("notebook_content").window
> panel = wx.Panel(auibook)
> box = wx.StaticBox(panel, -1, 'new box')
> auibook.AddPage(panel, 'new tab')
>
>
> Werner
>
That's what I thought, too- but the prob ist that this panel is outside
the tab then, i.e. pper left corner of the notebook's panel ...


This is not possible. Please provide a small runnable sample demonstrating the problem, platform and wxPython version, and whether you are using AGW from SVN. 


Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

>>> import PyQt4.QtGui
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ImportError: No module named PyQt4.QtGui
>>>
>>> import pygtk
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ImportError: No module named pygtk
>>> 
>>> import wx
>>>
>>>

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
I will ... give me another day or 2 for it- i am running on borrowed time here ;-)  - I just came up w/ a workaround which does it for now (I need to have sthg ready by 2morrow )

What I did is I added a class outside AuiFrame

<snip>

class TabPanel(wx.Panel):

    def __init__(self, parent):
        wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY)
        sizer = wx.BoxSizer(wx.VERTICAL)
        txt1 = wx.TextCtrl(self, wx.ID_ANY, "")
        txt2 = wx.TextCtrl(self, wx.ID_ANY, "")

        sizer = wx.BoxSizer(wx.VERTICAL)
        sizer.Add(txt1, 0, wx.ALL, 5)
        sizer.Add(txt2, 0, wx.ALL, 5)
        self.SetSizer(sizer)

</snip>

Inside AUI I call it like this:

<snip>
    def OnNewCustomerDataTab(self, event, calculationname):
       

        auibook = self._mgr.GetPane("notebook_content").window
        newtab = TabPanel(auibook)
        auibook.AddPage(newtab, u'Customer')

</snip>


ThanX
-- 
--------------------------------------------------
Tobias Weber
CEO

The ROG Corporation GmbH
Donaustaufer Str. 200
93059 Regensburg
Tel: +49 941 4610 57 55
Fax: +49 941 4610 57 56

www.roglink.com

GeschŠftsfŸhrer: Tobias Weber
Registergericht: Amtsgericht Regensburg - HRB 8954
UStID DE225905250 - Steuer-Nr.184/59359
--------------------------------------------------

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
C M
Reply | Threaded
Open this post in threaded view
|

Re: Survey: what editor are you using and why

C M
In reply to this post by Tobias Weber


1:
What platforms are u coding on?


Windows XP (and occasionally Ubuntu Linux to adapt it for that).  Test on Win7, too.
 
2:
What target platforms are you coding for?

Windows, Linux...hoping it will mostly "just work" for Mac, but don't own one.
 
4:
What languages other than python/ wx.python are you coding in on a
regular basis (ranking from most-1 to least-10 .... )?

None.
 
5:
Is python the main language u are using?

Yes (only one).
 
6:
What language are you coming from?

None. 
 
7:
What editors are you using for python and wx.python?

Boa Constructor, IDLE.
 
8:
What other editors have u used and why did u switch?

None.  Not such a "power user" that I feel it matters much in my case.
 
9:
What other GUI Toolkits are u using and why?

None.  No need for others.
 
10:
Is most of your programming:
- private
- open source
- commercial
- sthg. I did not think of ...

Private/hobby...possibly work to be released some decade. :D

11:
Are you actively involved in open source projects? If YES in what?

No, other than occasional helping out and a tutorial video.
 
12:
(Taken into account other GUI Toolkits experience) What are your top3
widgets/ features and what are the 3 most annoying things in wx.python?

Top Features of wxPython:
1. Community and support is as just great.
2. Overall quality of widgets (diversity, native look and feel).
3. The Demo

Annoying Things:
1. Not 100.0% cross-platform and so requires platform-specific tweaks (may be just a GUI truth generally, though)
2. wxRichTextCtrl has been under-developed since its release (2007?).
3. Bugs in the C++ level are often not correctable by Python coders and so we have to wait and hope that they are addressed by the wxWidgets developers.





 




Thanks for your conribution


Cheers,

T

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: Survey: what editor are you using and why

jmfauth
In reply to this post by Tobias Weber


On 14 sep, 13:46, Tobias Weber <[hidden email]> wrote:
>
> Simple quick questions ..


Did you not forget a question?  Python 2 our Python 3?

jmf

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
Reply | Threaded
Open this post in threaded view
|

Re: Survey: what editor are you using and why

Mario Lacunza-2
In reply to this post by Tobias Weber
Responses between lines..

Saludos / Best regards

Mario Lacunza
Email:: [hidden email]
Personal Website:: http://www.lacunza.biz/
OpenOffice.org:: http://es.openoffice.org/
OpenOffice.org Perú:: http://openoffice-peru.com/
Hosting:: http://mlv-host.com/
Mascotas Perdidas:: http://mascotas-perdidas.com/
Google Talk: mlacunzav Skype: mlacunzav
MSN: [hidden email] Y! messenger: mlacunzav


On 14/09/11 06:47, Tobias Weber wrote:
> It's been asked repeatedly over the last couple of years but from what I
> can read from the list archives it's been a while so I am interested
> what has changed over the past 3 years ...
>
> Simple quick questions .. in case we get a ot of replies I am willing to
> put it all 2gether online ....
>
> 1:
> What platforms are u coding on?

Linux Ubuntu
>
> 2:
> What target platforms are you coding for?

Linux Windows
>
> 4:
> What languages other than python/ wx.python are you coding in on a
> regular basis (ranking from most-1 to least-10 .... )?

PHP

>
> 5:
> Is python the main language u are using?
Not now
>
> 6:
> What language are you coming from?
VB
>
>
> 7:
> What editors are you using for python and wx.python?

Eclipse + PyDev
>
> 8:
> What other editors have u used and why did u switch?

Boa Constructor, SPE Ide, komodo aptana...

Mainly lack support, no enhancements, no updates and not integrated
debugguer.

>
> 9:
> What other GUI Toolkits are u using and why?
No one

>
> 10:
> Is most of your programming:
> - private
> - open source
> - commercial
> - sthg. I did not think of ...

Private

>
> 11:
> Are you actively involved in open source projects? If YES in what?
Not now
> 12:
> (Taken into account other GUI Toolkits experience) What are your top3
> widgets/ features and what are the 3 most annoying things in wx.python?
>

Only use wxPython for development, but like user QT is good too

>
>
> Thanks for your conribution
>
>
> Cheers,
>
> T
>

--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en
12