panels

Passing a tuple between two Panels in wxPython

蹲街弑〆低调 提交于 2019-12-08 06:22:21
问题 I am trying to pass the tuple of the the checked strings in one panel to the textCtrl widget in another panel. I thought that if I polled the panel class containing the checklistbox widget for the checked boxes and set that equal to an attribute of the panel class containing the TextCtrl widget I could do things in the TextCtrl widget based on the boxes that are checked I also tried using pubsub but I was having difficulty and wasn't sure if this was the case that you would use it or not. As

Passing a tuple between two Panels in wxPython

对着背影说爱祢 提交于 2019-12-06 19:35:19
I am trying to pass the tuple of the the checked strings in one panel to the textCtrl widget in another panel. I thought that if I polled the panel class containing the checklistbox widget for the checked boxes and set that equal to an attribute of the panel class containing the TextCtrl widget I could do things in the TextCtrl widget based on the boxes that are checked I also tried using pubsub but I was having difficulty and wasn't sure if this was the case that you would use it or not. As a disclaimer I am new to object oriented programming and python. I am making progress in learning

Readding panel to layout after editing panel?

前提是你 提交于 2019-12-06 17:14:40
问题 What I'm trying to do is dynamicly edit a panel and readd it to the (Border)layout. The panel contains textfields and I want the user to be able to add or remove textfields to the panel. What I tried is the following: remove the panel from the layout, add another textfield to the panel, readd the panel to the layout. However this doesn't work ( nothing happened; only the panel was removed but not readded with the new textfield in it , so the area was just empty ). Even when I removed the

Android Scratch card app

拜拜、爱过 提交于 2019-12-06 13:47:09
问题 I am doing a small project for college and wondering if someone can tell me how I would go about doing a scratch card app. This app should have one image overlaying another. The one on top should allow the user to remove the image depending on where they rub on the image and thus part of the image that was removed revealing the image underneath. Pretty much like a scratch card. Any help would be great! This is the code im using at the moment . public class workinggraphics extends Activity { /

Readding panel to layout after editing panel?

霸气de小男生 提交于 2019-12-04 21:44:19
What I'm trying to do is dynamicly edit a panel and readd it to the (Border)layout. The panel contains textfields and I want the user to be able to add or remove textfields to the panel. What I tried is the following: remove the panel from the layout, add another textfield to the panel, readd the panel to the layout. However this doesn't work ( nothing happened; only the panel was removed but not readded with the new textfield in it , so the area was just empty ). Even when I removed the panel from the layout and then added another component to the layout at that position (BorderLayout.EAST)

Android Scratch card app

不想你离开。 提交于 2019-12-04 19:33:29
I am doing a small project for college and wondering if someone can tell me how I would go about doing a scratch card app. This app should have one image overlaying another. The one on top should allow the user to remove the image depending on where they rub on the image and thus part of the image that was removed revealing the image underneath. Pretty much like a scratch card. Any help would be great! This is the code im using at the moment . public class workinggraphics extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle

Groovy SwingBuilder : button to change the color of a panel

别来无恙 提交于 2019-12-04 17:33:47
Why does this code fail ? I want to change the color of one panel in a series of several panels, dynamically constructed (total number of panels not known beforehand). For some reason, this code works when referencing the name of a particular panel (for example 'panel2'), but not when I refer to it dynamically ('panelID'). import groovy.swing.SwingBuilder import javax.swing.WindowConstants as WC import javax.swing.JOptionPane import javax.swing.BoxLayout as BXL swing = new SwingBuilder() frame = swing.frame(title:'test', defaultCloseOperation:WC.DISPOSE_ON_CLOSE) { panel(id:'mainPanel'){ def

Having a JLabel on top of another JLabel that has an image

↘锁芯ラ 提交于 2019-12-02 07:48:37
Soo I'm trying to make a board game with GUI. I created a JLabel with the player's name and want to use that as a token. Then I made another JLabel that contains the image of the board. I added both the labels onto a boardPanel and right now, the labels are side by side. How do I make it so that instead of it being side to side, the JLabel w/ name is on the JLabel w/ img? Is there something I should be considering for the panel that contains the two labels? Like a certain Layout Manager? [just sections of my code] import java.awt.*; import javax.swing.*; public class BoardFrame extends JFrame

WPF TextBox and Scroll behavior

半腔热情 提交于 2019-11-26 19:02:29
I have a problem. I need to host grid with controls in ScrollViewer to prevent textbox from being either truncated or collapsed to zero-with at the UI. Also I want the with of textbox to be expanded when user change windows width. I'm setting Window's content to following code <DockPanel> <TreeView DockPanel.Dock="Left" Width="150"/> <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> </Grid