visibility

How can I give a variable to an action listener?

I have a static variable partner in the class. And I want to set a value of these variable whenever a radio button is pressed. This is the code I tried to use: for (String playerName: players) { option = new JRadioButton(playerName, false); option.addActionListener(new ActionListener(){ @Override public void acti...

How to see components in toolbox after adding a new reference?

In my project I add reference on the WPFToolkit assembly, restart Visual Studio and has not seen WPFToolkit components in my VS ToolBox window. What I do wrong? ...

Why I do not see a static variable in a loop?

I have a static method which sets a variable: static String[] playersNames; public static void setParameters(String[] players) { playersNames = players; } Then I have a static block: static { JRadioButton option; ButtonGroup group = new ButtonGroup(); // Wright a short explanation of what the user should do. partnerSe...

Why my inner class DO see a NON static variable?

Earlier I had a problem when an inner anonymous class did not see a field of the "outer" class. I needed to make a final variable to make it visible to the inner class. Now I have an opposite situation. In the "outer" class "ClientListener" I use an inner class "Thread" and the "Thread" class I have the "run" method and does see the "ear...

WinForms Menu Toolstrip Get Status

So I have a project where there is some automatic initialization going on through some classes that are created automatically as global variables (yeah they are static instances). At a point inside this (it has no relation with the C# GUI for the user, so it isn't derived from any C# class) I need to see if a flag is set or not. I use ...

Ambiguous reference when getter/setter have different visibilities

The following code raises an ambiguous reference to value at compile time: import flash.display.Sprite; public class Main extends Sprite { private var _value : Number = 0.; public function get value() : Number { return _value; } private function set value(v : Number) : void { _value = v; } public function...

Android LinearLayout Visibility issues with Animation

Hello, I am trying to swap two LinearLayouts by setting their visibility properties to "VISIBLE" and "GONE" respectively. I am also using an animation while the layouts are being swapped. The animation completes successfully and I see the correct layout. However, the previous Layout which has its visibility property set to "GONE" still ...

How to determine visibility in 2D

Hello, I'm developing an AI sandbox and I would like to calculate what every living entity can see. The rule is to simply hide what's behind the edges of the shapes from the point of view of the entity. The image clarifies everything: I need it either as an input to the artificial intelligence either graphically, to show it for a spe...

Panel visible=true has no effect

I have a Panel that I'm setting visible=true explicitly. The debugger passes over that line and visible still evaluates to False on the next line. Obviously as a result, the Panel is not shown. How is this possible? pnlValidate.Visible = true; if (IsPostBack) return; <asp:Panel ID="pnlValidate" runat="server"> <asp:Button cssclass=...

WPF Visibility of a UI element based on combo selection

Trying to show a label only when a certain item in a combo is selected. Code should pretty much explain it. <ComboBox Name="comboMyCombo"> <ComboBoxItem>Don't show the label</ComboBoxItem> <ComboBoxItem>Show the label</ComboBoxItem> </ComboBox> <Label Visibility="Collapsed">This is my label <Label.St...

Visibility of Class field-data of Mouse Clicked ImageButton located within WrapPanel

I am attempting to obtain class-data associated with a mouse-clicked ImageButton; which ImageButton is located within a Scollviewer wrapped WrapPanel and filled with numerous other ImageButtons. The problem is that although I can see the instance of the ImageButton selected "((PlanetClass)(fe))", and have visibility of the class instance...

Object oriented design suggestion

Here is my code: class Soldier { public: Soldier(const string &name, const Gun &gun); string getName(); private: Gun gun; string name; }; class Gun { public: void fire(); void load(int bullets); int getBullets(); private: int bullets; } I need to call all the member functions of Gun over a Soldier object. Some...

PHP: prevent invocation of method X from from context != Y

This is a tricky one. I am "emulating" ZF Bootstrapping (surface appearance). Don't ask me why, call it academic interest. So I have a Bootstrap Abstract with a method "run" that iterates over itself to locate any methods prefixed with "init". The application looks for a user defined class which extends this class, in which the user ...

Android, make portions of text invisible in TextView

Hi, I suspect that adding a certain letter/character to the beginning of my text will solve an alignment problem I am currently facing. Needless to say that I do not wish for this letter to appear. Is there a way to tell a portion of the text to be invisible/transparent? I reviewed the Spannable interface could not find anything relate...

Android: How to hide a ListView Item

How can you hide an item in a ListView or at least set its height to zero? I have tried setting the visibility of the View to GONE but it still maintains the item's space (height). ...

Toggle two divs and classes

I have two links with classes (login-form and register-form) relevant to their target forms ID, they want to toggle. I have also a predefined 'slideToggle' function to toggle better. This is what I have tried so far: $('#userbar a').click(function() { var c = $(this).attr('class'); $('#userbar a').removeClass('active'); ...

Why a "private static" is not seen in a method?

I have a class with the following declaration of the fields: public class Game { private static String outputFileName; .... } I set the value of the outputFileName in the main method of the class. I also have a write method in the class which use the outputFileName. I always call write after main sets value for outputFileName. But wr...

Execution difference between "App.exe" and "App.vshost.exe" with WndProc

I am attempting to adapt an application developed in VS 2008/C# that listens to another application's WM_ messages through the use of the Control.WndProc method. When the "app.exe" version is run, WM_USER messages are visible and processed; however when the "app.vshost.exe" version is run, these same messages are no longer visible to th...

Reserve space for initially hidden widget in QVBoxLayout within QScrollArea

I am using a QVBoxLayout to arrange a vertical stack of widgets. The QVBoxLayout is contained within a QScrollArea. I want some of the widgets to be initially hidden and only show up when a check box is checked. Here is an example of the code I'm using. MyWidget::MyWidget(QWidget *parent) : QWidget(parent) { QVBoxLayout *layout =...

Visibility of nester class constructor

Is there a way to limit the instantiation of the nested class in C#? I want to prevent nested class being instantiated from any other class except the nesting class, but to allow full access to the nested class from other code. ...