473,503 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Add statusbar in wx.Panel

7 New Member
Hi all,

As I want to add a statusbar to show the x,y coordinates of an image on a panel/dialog.
But I find panel not include the function of SetStatusBar that I found in frame and I dun want to change the structure of it from dialog to frame.
Is there any other appropriate method to show the instant coordinates?

Thanks!

Brs,
Kanis
Nov 16 '07 #1
1 2131
bartonc
6,596 Recognized Expert Expert
Hi all,

As I want to add a statusbar to show the x,y coordinates of an image on a panel/dialog.
But I find panel not include the function of SetStatusBar that I found in frame and I dun want to change the structure of it from dialog to frame.
Is there any other appropriate method to show the instant coordinates?

Thanks!

Brs,
Kanis
Panels don't own status bars, frames do:
Expand|Select|Wrap|Line Numbers
  1. #Boa:Frame:Frame1
  2.  
  3. import wx
  4.  
  5. def create(parent):
  6.     return Frame1(parent)
  7.  
  8. [wxID_FRAME1, wxID_FRAME1STATUSBAR1, 
  9. ] = [wx.NewId() for _init_ctrls in range(2)]
  10.  
  11. [wxID_FRAME1MENU1ITEMS0] = [wx.NewId() for _init_coll_menu1_Items in range(1)]
  12.  
  13. class Frame1(wx.Frame):
  14.     def _init_coll_menuBar1_Menus(self, parent):
  15.         # generated method, don't edit
  16.  
  17.         parent.Append(menu=self.menu1, title='Menus0')
  18.  
  19.     def _init_coll_menu1_Items(self, parent):
  20.         # generated method, don't edit
  21.  
  22.         parent.Append(help='', id=wxID_FRAME1MENU1ITEMS0, kind=wx.ITEM_NORMAL, text='Items0')
  23.         self.Bind(wx.EVT_MENU, self.OnMenu1Items0Menu, id=wxID_FRAME1MENU1ITEMS0)
  24.  
  25.     def _init_utils(self):
  26.         # generated method, don't edit
  27.         self.menu1 = wx.Menu(title='')
  28.  
  29.         self.menuBar1 = wx.MenuBar()
  30.  
  31.         self._init_coll_menu1_Items(self.menu1)
  32.         self._init_coll_menuBar1_Menus(self.menuBar1)
  33.  
  34.     def _init_ctrls(self, prnt):
  35.         # generated method, don't edit
  36.         wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt, pos=wx.Point(110, 110),
  37.                 size=wx.Size(400, 250), style=wx.DEFAULT_FRAME_STYLE, title='Frame1')
  38.         self._init_utils()
  39.         self.SetClientSize(wx.Size(392, 223))
  40.         self.SetMenuBar(self.menuBar1)
  41.  
  42.         self.statusBar1 = wx.StatusBar(id=wxID_FRAME1STATUSBAR1, name='statusBar1', parent=self,
  43.                 style=0)
  44.         self.statusBar1.SetStatusText('')
  45.         self.SetStatusBar(self.statusBar1)
  46.  
  47.     def __init__(self, parent):
  48.         self._init_ctrls(parent)
  49.  
  50.     def OnMenu1Items0Menu(self, event):
  51.         event.Skip()
  52.  
Nov 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
2360
by: Tonya | last post by:
Hi, Does anyone know how i can add controls to a progress bar. I have searched the internet but could not find any examples. what i want to add is a progress bar and a button. thx
0
1153
by: Job Lot | last post by:
In my custom status bar control I have a status bar panel which is added to status bar when control is initialized Private m_StatusBarPanel As New StatusBarPanel Public Sub New()...
1
1346
by: Oleg Medyanik | last post by:
Hi, faced the following problem.. (NET 1.1) Steps to reproduce - 1.Create New Windows Forms Application 2. Add StatusBar and set ShowPanels = True 3. Add new panel and Set Autosize = Contents...
1
2554
by: Ahmet | last post by:
In my application, I have statusbar on which i show icons. On some cases, I have to change icon of my statusbar to show different messages on panels. But I dont know how to change icon of one...
3
3638
by: TonyM | last post by:
Hi all, I have an application with a few different Windows forms. I am trying to update a statusbar panel's text that is in the main form, from another form. When I set the statusbar and the...
10
4483
by: Nicolas | last post by:
When I resize (Enlarge) the form while the progress bar is running the rectangle drawing is not going to the end of the rectangle? I got a form with one button, one statusbar with three...
3
1903
by: EricJ | last post by:
Hi I'm having trouble getting icons from an imagelist in a statusbar panel. if i load the icons directly it works Dim ico As new Icon("W95MBX03.ICO") statusbarPanel..Icon = ico but if i try...
7
2094
by: Geoff | last post by:
I would like to have a status bar which has a few panels, one of which I want to display a different .gif under different conditions. I have added the status bar to the form, I have added the...
3
2937
by: Fred Morrison | last post by:
OK, the direct method of setting the background color on a text-only (no panels) statusbar control seems to fail: Me.StatusBar1.Text = "<whatever> failed.> Me.StatusBar1.Backcolor = Color.Yellow...
6
1501
by: Anony | last post by:
Hi All, I have two icons: Private micoIcon1 As New System.Drawing.Icon(System.IO.Path.Combine(Application.StartupPath, "Icon1.ico")) Private micoIcon2 As New...
0
7204
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7091
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6998
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7464
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5018
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3162
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
391
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.