focus

How to enable commit on focusLost for TableView/TreeTableView?

Deadly 提交于 2020-01-08 14:36:33
问题 Is there any simple approach to let the TreeTableView (or TableView) try to commit values on focus lost? Unfortunatly I didn't succed with any default-implementations of javafx TableCellFactories, which is why I tried my own TreeTableCell implementations and also some different tableCell implementations like the one from Graham Smith, which seemed the most straight forward, since it already implemented a hook for focus lost, but nevertheless the value is never committed and the userchanges

截取Url域名

别来无恙 提交于 2020-01-08 05:05:33
http://focus.it168.com/focus/201006/mobile/index.html 这是一个常见的Url,如果我们要取得地址中的域名,也就是: http://focus.it168.com .net(C#方法实现) web版本:   string str = " http://focus.it168.com/focus/201006/mobile/index.html "; int len1 = str.IndexOf(':')+3; int len = str.IndexOf('/', len1 , str.Length - len1 ); Response.Write(str.Substring(0,len)); winform版本:   string str = " http://focus.it168.com/focus/201006/mobile/index.html "; int len1 = str.IndexOf(':')+3; int len = str.IndexOf('/', len1 , str.Length - len1 ); Console.WriteLine(str.Substring(0,len));   Console.Read(); 输出结果: http://focus.it168.com/ 其他地址也一样

Replicating Mouse behavior in Code

安稳与你 提交于 2020-01-07 05:47:07
问题 This is related to question: Focus problems with JDK7 and native components. While working on workarounds we noticed that if we clicked on another component on the window (i.e. a label showing a picture) and then click on the text fields (within the Flash application), everything seemed to work fine. So I've been trying to reproduce that from code but haven't been successful. Basically, when the mouse is detected hovering over the text box I get notified from the Flash program and I request

Find the Parent RichTextBox from the Focused Hyperlink Within

旧巷老猫 提交于 2020-01-06 21:00:58
问题 The Setting: I have a RichTextBox containing a hyperink and a DropDownButton somewhere else in my UI. Now when I click the button's DropDown open and afterwards click somewhere else on my UI, the DropDown is implemented to close, and check if it still owns the keyboardfocus so it can set its ToggleButton to focused again after the DropDown collapsed as intended. The Problem: When clicking inside my RichTextBox I will face an InvalidOperationException caused by my method to check focus

Setting focus to a button next to a text box

末鹿安然 提交于 2020-01-06 08:41:13
问题 I have a question that is very similar to this one: Setting focus to a button from from text box? On my page, there is a text box, with a button next to it. It is an ASP.NET page, but the button is just a standard input tag, and when clicked, there is a client side function called. I want it so that when you hit enter, that button is clicked. I have managed to set focus initially using $("#mybutton").focus() , but when you click into the text box, the button loses the focus. Is there any way

Catching “global hotkeys” (Windows)

南楼画角 提交于 2020-01-06 05:38:08
问题 Now I've been trying to create a similar functionality as there is in Push-To-Talk voice chat applications, but so far I couldn't find any fitting solutions to this. I am not using MFC or CLR. The problem is quite simple. My window should be usually out of focus (ie minimized etc), but I need to react to keypresses (basically, I don't even want to know if the button is being held down or not). Unfortunately, WM_KEYDOWN only works if the window has keyboard focus. I do know that for example

Catching “global hotkeys” (Windows)

百般思念 提交于 2020-01-06 05:38:06
问题 Now I've been trying to create a similar functionality as there is in Push-To-Talk voice chat applications, but so far I couldn't find any fitting solutions to this. I am not using MFC or CLR. The problem is quite simple. My window should be usually out of focus (ie minimized etc), but I need to react to keypresses (basically, I don't even want to know if the button is being held down or not). Unfortunately, WM_KEYDOWN only works if the window has keyboard focus. I do know that for example

Set focus to inputText on validation error

孤人 提交于 2020-01-06 02:36:05
问题 I want to set focus on inputText field in JSF when there is a validation error on that particular inputText. How can I implement this? I thought validatorMessage on the inputText would do this out of the box but it appears not. 回答1: There is no such default behaviour. You need to implement it yourself or use a 3rd party library for the job. Basically, during the render response you need to walk through the submitted form for all UIInput components and find the first one whose isValid()

截取Url域名

谁说我不能喝 提交于 2020-01-06 02:12:08
http://focus.it168.com/focus/201006/mobile/index.html 这是一个常见的Url,如果我们要取得地址中的域名,也就是: http://focus.it168.com .net(C#方法实现) web版本:   string str = " http://focus.it168.com/focus/201006/mobile/index.html "; int len1 = str.IndexOf(':')+3; int len = str.IndexOf('/', len1 , str.Length - len1 ); Response.Write(str.Substring(0,len)); winform版本:   string str = " http://focus.it168.com/focus/201006/mobile/index.html "; int len1 = str.IndexOf(':')+3; int len = str.IndexOf('/', len1 , str.Length - len1 ); Console.WriteLine(str.Substring(0,len));   Console.Read(); 输出结果: http://focus.it168.com/ 其他地址也一样

How to change focus programmatically in tvOS

谁说胖子不能爱 提交于 2020-01-05 09:09:34
问题 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