wxwidgets

How to convert Windows desktop app to Mac desktop app?

孤街浪徒 提交于 2019-12-14 03:48:51
问题 I need to convert a C# .NET Windows desktop app to Mac. I've read about the cross-platform aspects of Qt, REAL Studio, LiveCode/RunRev, wxWidgets, and Mono (www.mono-project.com and http://monodevelop.com). Is Mono the only one that can be used to directly convert? If I were developing the app from scratch, what would be the advantages and disadvantages of each of these products? I've read great things about Qt, but the commercial license is expensive. I've read much less about REAL Studio

how to stop growing width of window when child sizers width increased in wx.Dialog in wxpython

人盡茶涼 提交于 2019-12-14 03:22:05
问题 I am very new to wxpython and wxwidgets.I have the code for wx.Dialog like below. def __init__(self, parent, Name, Platform): wx.Dialog.__init__(self, parent, -1, 'Launch Dialog', size=(-1,-1), pos=(-1,-1)) ###some code self.createSizers() self.Fit() def createSizers() self.mainSizer = wx.BoxSizer(wx.VERTICAL) SelectionSizer = wx.StaticBoxSizer(self.staticBoxTestSelection, wx.VERTICAL) self.horzDetailsSizer = wx.BoxSizer(wx.HORIZONTAL) self.DetailsSizer = wx.BoxSizer(wx.VERTICAL) ### add func

wxPython: This program needs access to the screen

旧巷老猫 提交于 2019-12-14 02:14:19
问题 I'm trying to use the Python GUI wx (installable via pip install wxPython ) in the following minimal app: import wx app = wx.App() Running this snippet returns the following: This program needs access to the screen. Please run with a Framework build of python, and only when you are logged in on the main display of your Mac. Does anyone know how to help wx gain "access to the screen", or what a "Framework build of Python" is? I'd be grateful for any help others can offer with these questions!

wxPython: Dragging a file into window to get file path

喜欢而已 提交于 2019-12-14 01:10:38
问题 I want to drag a file into a window and get the file path. I've tried doing this: class CSVDropper(wx.FileDropTarget): def __init__(self, data): wx.FileDropTarget.__init__(self) self.data = data def OnDropFiles(self, x, y, filenames): self.data = filenames print self.data then in the main window: # Drag & Drop self.csv_path = None self.drop_table = CSVDropper(self.csv_path) self.SetDropTarget(self.drop_table) But this does nothing. I've tried running this tutorial code, but it doesn't do

Inserting values to a multidimensional-vector in C++

末鹿安然 提交于 2019-12-13 21:14:09
问题 I've got a minor problem. I'm using multidimensional-vectors and I want to insert some values to it at a given position. I'm making a sudoku in wxWidgets and i'm getting the tiles the player have put in and wanting to store them in my mVector. The mVector looks like this. vector< vector<string> > board{9, vector<string>(9)}; And at first i've added values just like this. board[row][col] = value; "value" is a string and row/col are ints. Is this a legit way of adding values to the mVector? I'm

Embedding a live updating matplotlib graph in wxpython

自古美人都是妖i 提交于 2019-12-13 16:30:25
问题 I am a newbie into wx python. The following is the code to plot live graph from a text file which can be updated live. Can anybody please help me to embed this code into a wx frame. I desperately need it for my project. import matplotlib.pyplot as plt import matplotlib.animation as animation import time fig= plt.figure() ax1=fig.add_subplot(1,1,1) def animate(i): pullData= open('C:/test/e.txt','r').read() dataArray= pullData.split('\n') xar=[] yar=[] for eachLine in dataArray: if len(eachLine

wx.Image is throwing PyAssertionError

为君一笑 提交于 2019-12-13 15:26:04
问题 I ran the following python code import wx class myframe(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, title="Hello") self.InitUI() def InitUI(self): menubar = wx.MenuBar() fileMenu = wx.Menu() qmi = wx.MenuItem(fileMenu, 100, '&Quit\tCtrl+Q') qmi.SetBitmap(wx.Image('quit.png', wx.BITMAP_TYPE_ANY).ConvertToBitmap()) fileMenu.AppendItem(qmi) self.Bind(wx.EVT_MENU, self.OnQuit, id=100) menubar.Append(fileMenu, '&File') self.SetMenuBar(menubar) self.SetSize((250, 200)) self

Id returned 1 exit status - CodeBlocks with wxWidgets

*爱你&永不变心* 提交于 2019-12-13 10:29:20
问题 I have installed wxWidgets for Code::Blocks, watched a tutorial on YouTube on how to do this, everything seemed fine. I created a new project, but I can't compile. I get an error. This is how a project looks when I create it, and I do not change nothing in it. Project when I created it And here is the error. ld.exe cannot find -lwxmsw28u 回答1: 1) In order to make it work, you need to go to settings-->Global Variables. My home directory for wxWidgets is C:\wxWidgets-3.1.0-tdmgcc32 and this is

wxPython Window Maximize/restore

橙三吉。 提交于 2019-12-13 08:26:38
问题 After i minimize my window, how can i get it back up? The Iconize() must be mandatory. import wx class AAAA(wx.Frame): def __init__(self,parent,id): wx.Frame.__init__(self,parent,id,'Untitled',size=(450,395)) def minimizeProgram(event): print 'minimized' self.Iconize() self.Bind(wx.EVT_ICONIZE,minimizeProgram) if __name__=='__main__': app = wx.PySimpleApp() frame = AAAA(parent=None,id=-1) frame.Show() app.MainLoop() 回答1: Simply call wxWindow::Iconize(false) 来源: https://stackoverflow.com

MessageBoxW cannot convert

 ̄綄美尐妖づ 提交于 2019-12-13 07:07:06
问题 I am using wxWidgets 2.9.4 in Visual Studio 2012 and I keep getting these two error messages: Error 1 error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char *' to 'LPCWSTR' IntelliSense: argument of type "const char *" is incompatible with parameter of type "LPCWSTR" My code is: #ifdef _WIN32 std::string msg; StringFromFormatV(&msg, format, args); retval = IDYES == MessageBox(0, msg.c_str(), "ERROR! Continue?", MB_ICONQUESTION | MB_YESNO); 回答1: You are compiling your project