wxwidgets

How to make auto scrolling wx.grid table?

孤者浪人 提交于 2020-01-05 04:04:49
问题 python 2.7 I have wx.grid table. How can I do vertical scrolling? I tried: MakeCellVisible(rows,cols) and SetGridCursor(rows, cols) but they didn't work. 回答1: Use: grid_widget.Scroll(row, column) Edit: Here you have a working example: That was produced with: import wx import wx.grid as grid # class Button(wx.Frame): def __init__(self, parent, source): wx.Frame.__init__(self, parent, -1, size=(100,100)) self.source = source self.pos = 0 self.button = wx.Button(self, label='0') self.Bind(wx.EVT

How to make auto scrolling wx.grid table?

吃可爱长大的小学妹 提交于 2020-01-05 04:04:45
问题 python 2.7 I have wx.grid table. How can I do vertical scrolling? I tried: MakeCellVisible(rows,cols) and SetGridCursor(rows, cols) but they didn't work. 回答1: Use: grid_widget.Scroll(row, column) Edit: Here you have a working example: That was produced with: import wx import wx.grid as grid # class Button(wx.Frame): def __init__(self, parent, source): wx.Frame.__init__(self, parent, -1, size=(100,100)) self.source = source self.pos = 0 self.button = wx.Button(self, label='0') self.Bind(wx.EVT

Is it possible to hide/delete maximize button in wxWidgets C++?

心不动则不痛 提交于 2020-01-05 03:07:08
问题 I'm writing app in wxWidgets C++ version (using linux but I want to cross-compile to win) for my friend who plays RPG games.Quite simple app - 8 buttons imitating dices with diffrent sizes, and one static text showing the result of the randomizing. I've made the Window "static" - it is impossible to maximize it or ... generally change the size of the main window. So, I want to make the icon "maximize" hidden or deleted. I've been searching. However, I haven't found the solution. I've only

How to add an outline border to a widget?

邮差的信 提交于 2020-01-03 13:34:07
问题 How can I add a outline border to a widget in wxpython? (Any widget, for example, a wx.Button ) 回答1: For panel, you can use p = wx.Panel(....., style=wx.SUNKEN_BORDER) there you can choose from constants: wx.SIMPLE_BORDER wx.RAISED_BORDER wx.SUNKEN_BORDER wx.NO_BORDER If you want to create border around wx.Button , i would use my custom bitmap with wx.BitmapButton : b = wx.BitmapButton(pane, -1, wx.Bitmap('buttons/my_beautiful_button.png')) For any widget, i think you can always create a wx

Using GUI's in Python on an online IDE?

我只是一个虾纸丫 提交于 2020-01-03 08:41:16
问题 I have a question about running GUI's. I'm unfortunately running a Chrome OS, so that means I have no choice to use and run my code from an online IDE. I was wondering if it's at all possible to run a GUI package such as as Tkinter or wxWidgets from an online IDE? Any way at all? The main IDE I usually use is Cloud 9. 回答1: The answer to this is probably no. Packages like Tkinter and wxWidgets are written to interface on a lower level with the OS. Web interfaces such as Cloud9 wouldn't be able

How to get the minimize and maximize buttons to appear on a wxDialog object

血红的双手。 提交于 2020-01-03 02:53:13
问题 I've run into an issue using a wxDialog object on Linux In the construtor for the object I pass the relevant style flags (wxCAPTION|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX|wx_RESIZE_BORDER) but the buttons don't show up. When I was designing the class in wxformbuilder they would appear on the displayed design but don't show up in my running application. I'm using wxWidgets 2.8.7 at the moment and running on Scientific Linux 5 (RHEL 5). Any suggestions or ideas on how to work around this?

What does wxWidgets' EVT_CHAR_HOOK do?

无人久伴 提交于 2020-01-02 06:07:18
问题 I am maintaining a wxWidgets C++ application that uses EVT_CHAR_HOOK to capture key events in a high level window. I can't find any real documentation for this event but I can surmise that it intercepts key events in some way that has priority over the "standard" key events. One disturbing thing that I just discovered is that, if this hook is in place, any accelerator keys that might have been defined will no longer fire their events even if the event handler calls Skip() on the event. I've

Attaching the console with the GUI in wxWidgets

匆匆过客 提交于 2020-01-02 05:47:05
问题 I'm writing a wxWidgets GUI application, but it also uses some console objects. I need a way of displaying stdout and accessing stdin; the best way to do this, would be displaying the console as well as the GUI. This can be done if a user runs the program from the command prompt/shell etc, but the command prompt does not automatically open to view stdout when the application is ran. I know this has to be possible, because when you run a console application, the console runs automatically. I

How to sync the scrollbars of two grids in wx

大城市里の小女人 提交于 2020-01-02 05:46:06
问题 One custom wx.frame is created to contain a splitter window with two grid controls inside. It's used to compare the data in each of the grid. At this point the scrollbar of two grids need to support sync scroll. Questions: How to get these two grid's scroll event? I have tried to bin the wx.EVT_SCROLL event at the frame but failed. I also try to bind the scroll event in the custom grid control, it's failed too. How to sync scroll the scrollbar of the two grids? An answer of a relative

How to sync the scrollbars of two grids in wx

自古美人都是妖i 提交于 2020-01-02 05:46:05
问题 One custom wx.frame is created to contain a splitter window with two grid controls inside. It's used to compare the data in each of the grid. At this point the scrollbar of two grids need to support sync scroll. Questions: How to get these two grid's scroll event? I have tried to bin the wx.EVT_SCROLL event at the frame but failed. I also try to bind the scroll event in the custom grid control, it's failed too. How to sync scroll the scrollbar of the two grids? An answer of a relative