wxwidgets

Changing font colour of StyledTextCtrl

旧城冷巷雨未停 提交于 2019-12-25 17:39:35
问题 I am trying to change the default font colour of the following StyledTextCtrl, I've been testing this for awhile and changing the hex code values however I can't seem to get it to change colour. (I want it to be purple). The current default colour is Black. When I add self.StyleSetForeground(wx.stc.STC_STYLE_DEFAULT,wx.Colour(230, 230, 250)) It changes the colour of the line number. (On the side of the StyledTextCtrl, it shows the line you are on). Does anyone know a solution, or maybe whats

how do i start a wxPython program with a dialogbox, then pop another dialog and then make a basic canvas [duplicate]

荒凉一梦 提交于 2019-12-25 11:04:27
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to link multiple wx.Dialogs in wxPython Hi I want to make a wxPython app which first shows me a messageDialog, then an input dialog (which saves the playerName) and then makes a dc (DrawCanvas). Can any1 set up this framework for me plz? (I keep mixing up panels with frames and dialogs) 回答1: I already answered this, but here's my answer again: just put the dialog creation and instantiation right after the

Return value from wxpython main frame

无人久伴 提交于 2019-12-25 09:41:18
问题 i am facing some issues to get return value from wxpython main fram. my script: import wx import wx.xrc class Email_template( wx.Frame ): def __init__( self, parent, to, cc, subject, message_boby ): app = wx.App(False) wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 650,500 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL ) self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) self.SetBackgroundColour( wx.SystemSettings

Return value from wxpython main frame

ぐ巨炮叔叔 提交于 2019-12-25 09:37:20
问题 i am facing some issues to get return value from wxpython main fram. my script: import wx import wx.xrc class Email_template( wx.Frame ): def __init__( self, parent, to, cc, subject, message_boby ): app = wx.App(False) wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.Size( 650,500 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL ) self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize ) self.SetBackgroundColour( wx.SystemSettings

Setting selection background in ListCtrl

丶灬走出姿态 提交于 2019-12-25 08:51:32
问题 I'm trying to set a custom background for selected items in wxPython 2.8. I cannot figure out how to do so. I've tried SetItemBackground with no luck. 回答1: Selected items in wxListCtrl , wxListBox and so on always use the system background selection colour, it can't be changed. 来源: https://stackoverflow.com/questions/22624070/setting-selection-background-in-listctrl

How to change StatusBar font color in wxWidgets?

三世轮回 提交于 2019-12-25 08:29:14
问题 I want to display an error message in red on status bar if a user action results in error. I have tried setting the forground color to red but the it still displays the message in default black font. How do make the font color red on statusbar? I'm using wxWidgets 2.8 on red hat 5.5 Thanks! 回答1: Found out the answers from wxWidget forum: this->StatusBar->SetForegroundColour(wxColour(wxT("RED"))); wxStaticText* txt = new wxStaticText( this->StatusBar, wxID_ANY,wxT("Validation failed"), wxPoint

How to build wxmathPlot for win32?

半世苍凉 提交于 2019-12-25 07:05:15
问题 I downloaded the latest wxmathplot but the readme is a bit sparse with instructions on how to build on win32 platform. Has anyone used this library for win32? Can someone point me to the docs or give some hints/advice on how to build for win32 targets. We'll eventually use this for cross platform stuff, for now it is just win32 until we port our other code. I presume I have to use CMake, but have not used it before and it is not obvious to me how to build this all - I have already installed

How add already captured screenshot to wx.BoxSizer?

一世执手 提交于 2019-12-25 04:51:19
问题 My Python code: self.images = wx.StaticBitmap(self, id=-1, pos=wx.DefaultPosition, size=(200,150), style= wx.SUNKEN_BORDER) self.hbox = wx.BoxSizer(wx.HORIZONTAL) self.sizer.Add(self.hbox) # my main sizer #in function dynamically captured images bmp = wx.BitmapFromImage(image) self.images.SetBitmap(bmp) self.hbox.Add(self.images, 1, wx.EXPAND | wx.ALL, 3) ...and after I want to add next image (another - I don't want to replace older) I have information "Adding a window to the same sizer twice

How to use Mathplot in wxSmith(Code::Blocks) and wxWidgets

﹥>﹥吖頭↗ 提交于 2019-12-25 04:38:18
问题 I am using wxSmith in Code::Blocks for a GUI application. Everything is alright for creating basic wxWidgets components but I need to plot something within. Thus, I have downloaded MathPlot, and copied both mathplot.h and mathplot.cpp to my project folder. There is this category 'mathplot' at the wxSmith's palette (at the bottom of the editor). I have selected the 'mpWindow' component, and added #include "mathplot.h" to my main.h file for parameters declaration etc. My problem here is I am