473,387 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

[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/DfVjaYqcRAtyAAJ0So/if+RLqW32T/0SZfjJWhRJiqwCffzDp
2VBbhRFlxQtcyezpiBDBCyU=
=GJX8
-----END PGP SIGNATURE-----
Jul 18 '05 #1
3 4087
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/DfVjaYqcRAtEgAJ9eKKjwZIKrLLhRKTBp4clypIoCywCgix4y
Ys/mmFTDse7vW0D1hG2SmGI=
=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(panel, -1, "Read-only", style=wx.TE_READONLY)
sizer.Add(label1, 0, flag=wx.EXPAND|wx.ALL, border=10)

label2 = wx.TextCtrl(panel, -1,
"Read-only + No Border + Change BG Color",
style=wx.TE_READONLY|wx.NO_BORDER)
label2.SetBackgroundColour(panel.GetBackgroundColo ur())
sizer.Add(label2, 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
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++...
7
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...
0
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...
1
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...
0
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...
1
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...
0
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...
0
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...
4
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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...

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.