visible

What is the best way to determine if a window is actually visible in WPF

这一生的挚爱 提交于 2019-12-14 03:43:28
问题 I'm trying to toggle the display of a small window based on the click of a notify icon in a system tray app. This is simple enough to implement, however when the small window is displayed and another application takes focus and therefore moves in front of it (z-order) I want the toggle to assume that the small window is now hidden, even though it's visibility is still set to visible. Otherwise, clicking the icon would set the windows visiblity to hidden even though it is already hidden behind

How to enter password using Selenium webdriver if the password style is display:none

别来无恙 提交于 2019-12-14 03:27:24
问题 I have a page with login and password (betmarathon[d.o.t]com). I want to login to the site using selenium webdriver. Selenium enters the login correctly, but i have problems with entering password. I get "Element not visible" exception. My code for selenium looks like this: driver.findElement(By.id("auth_login")).sendKeys("MY-USERNAME"); driver.findElement(By.id("auth_login_password")).sendKeys("MY-PASSWORD"); Html code of the page looks like this: <div class="user"> <input id="auth_login"

Run animation when element is visible on screen

可紊 提交于 2019-12-13 04:16:44
问题 I've a little progress bars script. It works fine but runs on page load. I want to run animation when bars are visible on screen (it should work too if progress bars would be in tabs). How may I get this? Here's script: setTimeout(function(){ $('.skill-bar .skill-bar-content').each(function() { var me = $(this); var perc = me.attr("data-percentage"); var current_perc = 0; var progress = setInterval(function() { if (current_perc>=perc) { clearInterval(progress); } else { current_perc +=1; me

jQuery: counting visible elements - efficiency/speed problems

我只是一个虾纸丫 提交于 2019-12-12 11:05:01
问题 I have some code that works fine but it's become too slow: HTML: I have a container that contains about 50 ul elements. Each ul element has a h4 heading followed by a series of li elements. The function hides the heading if no line elements are visible. Javascript/jQuery: function show_or_hide_headings() { $('#container').children('ul').each(function (i) { var $this = $(this), $h4 = $this.children(':first'); if ($this.children('li:visible').length) { $h4.show(); } else { $h4.hide(); } }); }

Android: Increment Button in loop to setVisibility

强颜欢笑 提交于 2019-12-12 05:18:23
问题 I make a game like 4Pics1Word. Now I have 14 buttons and I want to set the visibility of the Buttons in a loop. If the answer has 5 letters, the first 5 Buttons should be Visible For example this is my code: int lengthTest = dataArr.get(currentQuestion)[0].length(); // Get Length of the word from the array. for (int nr = 0; nr <= lengthTest; nr++) { // My Loop doesnt work answer[nr].setVisibility(View.VISIBLE); } And that is what I have now, but for 100 Pics it take´s to long to write it

Java SWT added Label not visible

允我心安 提交于 2019-12-11 18:04:36
问题 I'm new to SWT and currently struggling to make a Label instance visible. At the moment, I need to resize the window manually to make it appear. I found a similar question on SO that mentions the cache of SWT. So I tried the suggested call of shell.layout(); but it does not work for me. Here is my code: public class SimpleTextEditorCount { private Display display = new Display(); private Shell shell = new Shell(this.display); private StyledText styledText; private boolean unsaved; private

jQuery reset visible video when fading out a container

我是研究僧i 提交于 2019-12-11 16:53:46
问题 I've got a page with a container that has several videos embedded from vimeo via their new universal embed. All of the videos are each in a smaller container which has the iframe embed and a paragraph describing the video. jQuery has the smaller containers initially hidden, and dynamically selects and fades in the appropriate container depending on which thumbnail you click on. Whichever container is active can be faded out by clicking on a close-button or outside of the container (think

Filter Last items of Pivot table (vba)

主宰稳场 提交于 2019-12-11 16:52:49
问题 SNapshot I have a pivot table that needs to show only the last 13 items (week). Below is teh code i used. However, what ever the Visible status of the item in the pivot, it does not change even forcing it to True/False. Already tried an if/else statement but still Visible state does not change. Appreciate help on this. Thanks! Sub ShowLastXDays() Dim pi As PivotItem Dim lLoop As Long Dim pt As PivotTable Dim pf As PivotField Dim lCount As Long Dim lDays As Long Dim Count As Long On Error

How to Disable/Enable JFrame Component when JInternalFrame isVisible inside JFrame/JDesktopPane?

本秂侑毒 提交于 2019-12-11 11:50:56
问题 How to Disable/Enable JFrame components when JInternalFrame isVisible inside JFrame / JDesktopPane ? For example, make every JInternalFrame1 visible on the JDesktopPane (desktop pane set on the JFrame ) all frame components like JMenuBar / JButton /etc. set disabled. Have a solution? 回答1: If you have a reference to all your components, the best shot is to write a simple method that would disable everything (more or less like a state machine). If you don't have a reference to all of them (like

jquery count :visible doesn't work in IE7

独自空忆成欢 提交于 2019-12-11 07:45:41
问题 I have created a tool using jQuery that will show certain table rows depending on if certain checkboxes are selected. I am trying to have text that will display "3 Posters are required" for example. I am using the code below. In IE7 it is broken and instead of showing the number of < tr class="hidden"> that are visible , it is just showing the total number of < tr class="hidden">. Is there anything wrong with this code? $(".hidden").hide(); function countChecked() { var n = $("tr.hidden