focus

How to change focus programmatically in tvOS

不打扰是莪最后的温柔 提交于 2020-01-05 09:08:54
问题 I am developing a tvOS app in swift. I am using UITabBarController in the app. My requirement is to hide the tabbar automatic after 10 seconds and focus can move to AVPlayerViewController inside the tabbar item. I tried to override preferredFocusedView , but focus cannot move to AVPlayerViewController . func updateFocus() { self.playerController.view.hidden = false self.playerController.view.alpha = 1.0 self.playerController.view.userInteractionEnabled = true self.playerController.view.layer

Cocoa WebView on os X not firing mouse hover events without having to click and hold left mouse key

我的梦境 提交于 2020-01-05 08:17:30
问题 I am new to Mac development and am trying to incorporate the use of a Cocoa WebView using the QMacCocoaViewContainer. I have the view loading my html file with multiple css and javascript files but the issue I am having is that the mouse hover events are not triggered when the user moves the mouse over the view. I have identified that if the user clicks and holds the left mouse button and moves the mouse then the events are triggered. I am guessing that it is a focus issue but have had no

DAX - 2 phased weighted average with 2 different weight measures

那年仲夏 提交于 2020-01-05 05:31:07
问题 I have rather complex problem to expres. In DAX powerpivot I am trying to create measure which will be using two different Weighted averages in one measure based on aggregation level. The problem is complicated even more, because weight measures have different level of duplication (need to apply distinct SUM on them).I have been able to create Distinct SUM Measure1 and 2 to solve that. [Weight_1] = SUMX(DISTINCT(Table1[Level2],[SupportWeight1]) [SupportWeight1] = MAX(Table1[RevenueLevel2])

JButton does not gain focus immediately after setEnabled(true)

不想你离开。 提交于 2020-01-05 03:44:27
问题 I am trying to make an intuitive user interface where the user would enter the numeric values into the JTextFields , advance with the TAB key and finally activate the button to start processing the input. At the beginning the button is disabled and it should be enabled only when all of the data is entered into the text fields. I am using javax.swing.InputVerifier to restrict entering only positive numbers up to 4 decimal places and that works fine. There are 3 focusable objects, two text

JButton does not gain focus immediately after setEnabled(true)

試著忘記壹切 提交于 2020-01-05 03:44:05
问题 I am trying to make an intuitive user interface where the user would enter the numeric values into the JTextFields , advance with the TAB key and finally activate the button to start processing the input. At the beginning the button is disabled and it should be enabled only when all of the data is entered into the text fields. I am using javax.swing.InputVerifier to restrict entering only positive numbers up to 4 decimal places and that works fine. There are 3 focusable objects, two text

MVC implementation of Java Swing FocusListener

放肆的年华 提交于 2020-01-05 01:32:53
问题 I'm trying to build a simple Java Swing application using the MVC architecture pattern. What I've done is create the user interface components (as private) in my views, and have public methods that return the components. These methods are then called by the controllers, through which I can write methods for event/action listeners. Below is a sample example: View: private JButton btnAdd; public JButton getBtnAdd(){ return btnAdd; } Control: myGuiFrame gui = new myGuiFrame(); //on add button

How could a TextBox's cursor move to the beginning of the text after calling SelectAll()?

强颜欢笑 提交于 2020-01-04 09:10:22
问题 On some occasions, when focus is set to a particular textbox, the cursor parks itself before the text like this: Yet, the TextBox has a GotFocus handler that explicitly selects all the text: private void txtQty_GotFocus(object sender, EventArgs e) { try { if (deviceInfo.isKeyboardShown()) { SipShowIM(SIPF_OFF); } txtQty.SelectAll(); txtQty.BackColor = Color.Yellow; } catch (Exception ex) { NRBQ.ExceptionHandler(ex, "frmEntry.txtQty.GotFocus"); } } Also, the BackColor is not set to yellow. But

How could a TextBox's cursor move to the beginning of the text after calling SelectAll()?

試著忘記壹切 提交于 2020-01-04 09:10:08
问题 On some occasions, when focus is set to a particular textbox, the cursor parks itself before the text like this: Yet, the TextBox has a GotFocus handler that explicitly selects all the text: private void txtQty_GotFocus(object sender, EventArgs e) { try { if (deviceInfo.isKeyboardShown()) { SipShowIM(SIPF_OFF); } txtQty.SelectAll(); txtQty.BackColor = Color.Yellow; } catch (Exception ex) { NRBQ.ExceptionHandler(ex, "frmEntry.txtQty.GotFocus"); } } Also, the BackColor is not set to yellow. But

How to repaint out of focus dialog without gaining its focus?

断了今生、忘了曾经 提交于 2020-01-04 09:09:11
问题 I made some menu and it is to update conmmon variables (for text on grid) then the out-of-focus dialog must repaint the grid. Here is the screenshot: The main control panel is always at top position and 'Data Display' panel is always sitting behind it. When press a button on front panel, Data Display must update its grid. Currently, the common variable 0.4 on the grid is updated by adding listener and works fine. But the grid itself is not repainting anymore. How can I repaint the out-of

Why does calling Focus() not set focus in this instance?

笑着哭i 提交于 2020-01-04 06:57:10
问题 I adapted a roll-your-own Input box based on this. I modified the code to the following: using System; using System.Windows.Forms; public static class PromptForText { public static string ShowDialog(string caption, string text) { Form prompt = new Form(); prompt.Width = 280; prompt.Height = 150; prompt.Text = caption; Label textLabel = new Label() { Left = 16, Top = 20, Width = 240, Text = text }; TextBox textBox = new TextBox() { Left = 16, Top = 40, Width = 240 }; Button confirmation = new