473,563 Members | 2,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[wxPython] wxStaticText

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

How can i make a wxStaticText markable?

Regards,
Bernd Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows 2000)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFA5uv1P5/DfVjaYqcRAtyAAJ 0So/if+RLqW32T/0SZfjJWhRJiqwCf fzDp
2VBbhRFlxQtcyez piBDBCyU=
=GJX8
-----END PGP SIGNATURE-----
Jul 18 '05 #1
3 4090
Bernd Kaiser wrote:
How can i make a wxStaticText markable?


What do you mean by markable?

greg
Jul 18 '05 #2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greg Krohn wrote:
| Bernd Kaiser wrote:
|> How can i make a wxStaticText markable?
|
| What do you mean by markable?
|
| greg

Oh sorry,
I mean selectable, so you can select the text with the mouse.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows 2000)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFA5u1zP5/DfVjaYqcRAtEgAJ 9eKKjwZIKrLLhRK TBp4clypIoCywCg ix4y
Ys/mmFTDse7vW0D1hG 2SmGI=
=mOqU
-----END PGP SIGNATURE-----
Jul 18 '05 #3
Bernd Kaiser wrote:
I mean selectable, so you can select the text with the mouse.


I would use a TextCtrl. You can set it's style to read-only if all you
really want is selectable text which can't be edited by the user. Or if
you DO want it to resemble a StaticText, also remove the border style
and change the background Colour. The only apparent downside of this
approach is you still get a blinking cursor (at least on WinXP).
import wx

app = wx.PySimpleApp( )
frame = wx.Frame(None, -1, "Test")

panel = wx.Panel(frame, -1)
sizer = wx.BoxSizer(wx. VERTICAL)
panel.SetSizer( sizer)

label1 = wx.TextCtrl(pan el, -1, "Read-only", style=wx.TE_REA DONLY)
sizer.Add(label 1, 0, flag=wx.EXPAND| wx.ALL, border=10)

label2 = wx.TextCtrl(pan el, -1,
"Read-only + No Border + Change BG Color",
style=wx.TE_REA DONLY|wx.NO_BOR DER)
label2.SetBackg roundColour(pan el.GetBackgroun dColour())
sizer.Add(label 2, 0, flag=wx.EXPAND| wx.ALL, border=10)

frame.Show(True )
app.MainLoop()
hth,
greg
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4187
by: Daniel Ehrenberg | last post by:
I'm trying to learn wxPython, but I can't seem to find much documentation. The wxPython website says that all advanced (and even some basic) documentation for wxPython is only available in C++ syntax in the main wxWindows documentation. It also says that the samples will help, but I can't seem to make sense of them. Should I just use a...
7
11888
by: SeeBelow | last post by:
Do many people think that wxPython should replace Tkinter? Is this likely to happen? I ask because I have just started learning Tkinter, and I wonder if I should abandon it in favor of wxPython. Mitchell Timin -- "Many are stubborn in pursuit of the path they have chosen, few in
0
2158
by: Piet | last post by:
Hello wxPythoneers. I have a problem with a dialog box derived from wxFrame which has a wxComboBox as main element. Depending on the entry selected from the ComboBox, the dialog box will be populated with a number of controls. This works fine for the first selection of a combobox item, but subsequent selections from the combobox cause...
1
2148
by: mdk.R | last post by:
Hello all: i'am installed wxPython 2.5 and Python2.3.4..i try execute script with wxPython but it show error: Traceback (most recent call last): File "E:\py\test.py", line 7, in ? import wx File "E:\py\wx.py", line 10, in ? from wxPython.wx import * File "D:\Python23\Lib\site-package import _wx
0
1207
by: Scott | last post by:
I have the code below. I have changed the background of the frame to white, but I cannot get the wxSlider to not be the ugly gray color. Can someone tell me how to change it to a transparent background (I tried wxTRANSPARENT_WINDOW without success)? import os from wxPython.wx import * ID_ABOUT=101 ID_EXIT=110 class MainWindow(wxFrame):
1
2555
by: timothy.williams | last post by:
I'm trying to install wxPython 2.5.3.1 using Python 2.3.2 on a Fedora 2 machine. I have python in a non-standard place, but I'm using --prefix with the configure script to point to where I have everything. The make install in $WXDIR seemed to go fine. I have the libxw* libraries in my lib/ directory libwx_base-2.5.so@ ...
0
1651
by: Robin Dunn | last post by:
Announcing ---------- The 2.6.3.0 release of wxPython is now available for download at http://wxpython.org/download.php. There have been many enhancements and fixes implemented in this version, many of which are listed below and at http://wxpython.org/recentchanges.php. What is wxPython?
0
1427
by: Conrad | last post by:
Greetings, For user actions on a wxWidget that trigger multiple events for that wxWidget, is the order those events are processed in undefined, and therefore arbitrary from one platform (ie Windows) to the next (ie Linux)? Specifically, I have a convience aggregate class that combines a wxStaticText with a wxComboBox, as I often need...
4
3167
by: kkt49 | last post by:
# vim: et sw=4 ts=8 sts from wxPython.wx import * import sys, os, time import pywintypes import win32serviceutil import win32service import win32event import win32process
0
7664
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.