Skip to main content

Questions tagged [visibility]

Visibility is an attribute of an object. It may refer to the concept of having something visible (or not) on the graphical interface, or a symbol visibility in linkage. This tag should not be used in place of the more specific tags [memory-visibility] or [class-visibility].

visibility
43 votes
8 answers
15k views

Reasons to use private instead of protected for fields and methods

This is a rather basic OO question, but one that's been bugging me for some time. I tend to avoid using the 'private' visibility modifier for my fields and methods in favor of protected. This is ...
Silvio Donnini's user avatar
37 votes
12 answers
3k views

How to change css of tag from an outside link

I have a menu in a tag called sf-menu. I need the visibility to change to none when the link is clicked and toggled back when clicked again. Can I achieve this with CSS only or do I need JavaScript? ...
Erik's user avatar
  • 5,751
35 votes
7 answers
32k views

Expose a private Objective-C method or property to subclasses

According to some official talk, a class in Objective-C should only expose public methods and properties in its header: @interface MyClass : NSObject @property (nonatomic, strong) MyPublicObject *...
hzxu's user avatar
  • 5,813
34 votes
6 answers
121k views

Bind visibility property to a variable

I have a Border with Label inside a Window, <Border x:Name="Border1" BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Height="21" Margin="229,164,0,0" VerticalAlignment="Top" ...
7zawel's user avatar
  • 383
34 votes
3 answers
27k views

toggle visibility of chain group in constraint layout

In previous xml layout, I have multiple view groups with few elements inside. Hide each view group will also hide all of its child elements. Since I wanted to have flat structure and tried ...
Tixeon's user avatar
  • 930
34 votes
2 answers
50k views

C++ -fvisibility=hidden -fvisibility-inlines-hidden

I have a question about the C++ visibility attribute. I have read http://gcc.gnu.org/wiki/Visibility and yet I dont quite understand how it works. I want use the visibility to be hidden on some of my ...
nixgadget's user avatar
  • 7,302
34 votes
7 answers
8k views

How to demonstrate java multithreading visibility problems?

If variables in Java are accessed from multiple threads, one must ensure that they are safely published. This usually means using synchronizedor volatile. I have got the impression, that some of my ...
Joe23's user avatar
  • 5,752
34 votes
5 answers
19k views

Is there a downside to using -Bsymbolic-functions?

I recently discovered the linker option "-Bsymbolic-functions" in GNU ld: -Bsymbolic When creating a shared library, bind references to global symbols to the definition within the shared library,...
Johannes Schaub - litb's user avatar
33 votes
9 answers
55k views

Call private methods and private properties from outside a class in PHP

I want to access private methods and variables from outside the classes in very rare specific cases. I've seen that this is not be possible although introspection is used. The specific case is the ...
Pablo López Torres's user avatar
33 votes
2 answers
11k views

Why there are only 75 visible characters in Intellij Idea's embedded terminal?

When I use Idea's embedded command prompt in the tools window I can only see 75 characters. The chars are there but they are not visible: C:>echo "This is the sentence I want to show you but I get ...
Gabriel Xunqueira's user avatar
32 votes
4 answers
33k views

WPF Tooltip Visibility

How can I ensure that a button's Tooltip is only visible when the button is disabled? What can I bind the tooltip's visibility to?
David Ward's user avatar
  • 3,799
32 votes
8 answers
30k views

Accessing a Private Constructor from Outside the Class in C#

If I define a class with a private default constructor and a public constructor that has parameters, how can I access the private constructor? public class Bob { public String Surname { get; set; } ...
AndrewJacksonZA's user avatar
31 votes
5 answers
63k views

Dynamically toggle visibility of WPF grid column from C# code

My problem is: I can't find out how to toggle the visibility of my WPF grid column. Assume following XAML markup: <Grid x:Name="myGrid"> <Grid.RowDefinitions> <...
sebi's user avatar
  • 431
31 votes
5 answers
59k views

Defining constants in python class, is self really needed?

I want to define a set of constants in a class like: class Foo(object): (NONEXISTING,VAGUE,CONFIRMED) = (0,1,2) def __init__(self): self.status = VAGUE However, I get NameError: ...
Theodor's user avatar
  • 5,626
31 votes
2 answers
78k views

Hiding an element: Difference between Javascript attribute and CSS style

I wonder if there is any difference in the result when hiding an element with JavaScript attribute or CSS Style. For example: element.setAttribute("hidden", true); vs element.style.visibility = "...
Jbartmann's user avatar
  • 1,509

15 30 50 per page