Search Results

Search found 4289 results on 172 pages for 'focus stealing'.

Page 6/172 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • dijit tree and focus node

    - by user220836
    Hello, I cannot get focusNode() or expandNode() get working. I also tried switching back to dojo 1.32 and even 1.3, no difference to 1.4. And I debugged with firebug, the node is a valid tree node and no errors occur but the node wont get focused. Help is VERY appreciated! <head> <script type="text/javascript"> dojo.declare("itcTree",[dijit.Tree], { focusNodeX : function(/* string */ id) { var node=this._itemNodesMap[id]; this.focusNode(node); } }); </script> </head> <body class="tundra"> <div dojoType="dojo.data.ItemFileReadStore" jsId="continentStore" url="countries.json"> </div> <div dojoType="dijit.tree.ForestStoreModel" jsId="continentModel" store="continentStore" query="{type:'continent'}" rootId="continentRoot" rootLabel="Continents" childrenAttrs="children"> </div> <div dojoType="itcTree" id="mytree" model="continentModel" openOnClick="true"> <script type="dojo/method" event="onClick" args="item"> dijit.byId('mytree').focusNodeX('AF'); </script> </div> <p> <button onclick="dijit.byId('mytree').focusNode('DE');">klick</button> </p> </body>

    Read the article

  • Swing- focus problem

    - by AlonaK
    Hi, In my application I have a frame, with toolbar (the toolbar contains some actions). I want the toolbar to be visible only when the window is focused. So, I registered a windowFocusListener on the window. The problem is- when the window is not focused and I click on the place where a tool bar action should be- the action is performed. This happens because the WindowFocusGained is called before the mouse button is released and when the mouse button released it calls the actionPerformed. Does anybody has any idea for a work around for this problem? Does anybody know how to determine wether the mouse button is clicked now?

    Read the article

  • iPhone UIWebView initial focus?

    - by BahaiResearch.com
    I have a simple app with a full screen UIWebView. This contains HTML generated by the app. I respond to clicks on various elements of the page via document.location = "someCommand" I have to touch the screen once before it will respond to a second touch. It's almost like it is not the focused control. it is the only view in the app. How can I ensure that the first time the UIWebView is touched it responds?

    Read the article

  • The Art of Productivity

    - by dwahlin
    Getting things done has always been a challenge regardless of gender, age, race, skill, or job position. No matter how hard some people try, they end up procrastinating tasks until the last minute. Some people simply focus better when they know they’re out of time and can’t procrastinate any longer. How many times have you put off working on a term paper in school until the very last minute? With only a few hours left your mental energy and focus seem to kick in to high gear especially as you realize that you either get the paper done now or risk failing. It’s amazing how a little pressure can turn into a motivator and allow our minds to focus on a given task. Some people seem to specialize in procrastinating just about everything they do while others tend to be the “doers” who get a lot done and ultimately rise up the ladder at work. What’s the difference between these types of people? Is it pure laziness or are other factors at play? I think that some people are certainly more motivated than others, but I also think a lot of it is based on the process that “doers” tend to follow - whether knowingly or unknowingly. While I’ve certainly fought battles with procrastination, I’ve always had a knack for being able to get a lot done in a relatively short amount of time. I think a lot of my “get it done” attitude goes back to the the strong work ethic my parents instilled in me at a young age. I remember my dad saying, “You need to learn to work hard!” when I was around 5 years old. I remember that moment specifically because I was on a tractor with him the first time I heard it while he was trying to move some large rocks into a pile. The tractor was big but so were the rocks and my dad had to balance the tractor perfectly so that it didn’t tip forward too far. It was challenging work and somewhat tedious but my dad finished the task and taught me a few important lessons along the way including persistence, the importance of having a skill, and getting the job done right without skimping along the way. In this post I’m going to list a few of the techniques and processes I follow that I hope may be beneficial to others. I blogged about the general concept back in 2009 but thought I’d share some updated information and lessons learned since then. Most of the ideas that follow came from learning and refining my daily work process over the years. However, since most of the ideas are common sense (at least in my opinion), I suspect they can be found in other productivity processes that are out there. Let’s start off with one of the most important yet simple tips: Start Each Day with a List. Start Each Day with a List What are you planning to get done today? Do you keep track of everything in your head or rely on your calendar? While most of us think that we’re pretty good at managing “to do” lists strictly in our head you might be surprised at how affective writing out lists can be. By writing out tasks you’re forced to focus on the most important tasks to accomplish that day, commit yourself to those tasks, and have an easy way to track what was supposed to get done and what actually got done. Start every morning by making a list of specific tasks that you want to accomplish throughout the day. I’ll even go so far as to fill in times when I’d like to work on tasks if I have a lot of meetings or other events tying up my calendar on a given day. I’m not a big fan of using paper since I type a lot faster than I write (plus I write like a 3rd grader according to my wife), so I use the Sticky Notes feature available in Windows. Here’s an example of yesterday’s sticky note: What do you add to your list? That’s the subject of the next tip. Focus on Small Tasks It’s no secret that focusing on small, manageable tasks is more effective than trying to focus on large and more vague tasks. When you make your list each morning only add tasks that you can accomplish within a given time period. For example, if I only have 30 minutes blocked out to work on an article I don’t list “Write Article”. If I do that I’ll end up wasting 30 minutes stressing about how I’m going to get the article done in 30 minutes and ultimately get nothing done. Instead, I’ll list something like “Write Introductory Paragraphs for Article”. The next day I may add, “Write first section of article” or something that’s small and manageable – something I’m confident that I can get done. You’ll find that once you’ve knocked out several smaller tasks it’s easy to continue completing others since you want to keep the momentum going. In addition to keeping my tasks focused and small, I also make a conscious effort to limit my list to 4 or 5 tasks initially. I’ve found that if I list more than 5 tasks I feel a bit overwhelmed which hurts my productivity. It’s easy to add additional tasks as you complete others and you get the added benefit of that confidence boost of knowing that you’re being productive and getting things done as you remove tasks and add others. Getting Started is the Hardest (Yet Easiest) Part I’ve always found that getting started is the hardest part and one of the biggest contributors to procrastination. Getting started working on tasks is a lot like getting a large rock pushed to the bottom of a hill. It’s difficult to get the rock rolling at first, but once you manage to get it rocking some it’s really easy to get it rolling on its way to the bottom. As an example, I’ve written 100s of articles for technical magazines over the years and have really struggled with the initial introductory paragraphs. Keep in mind that these are the paragraphs that don’t really add that much value (in my opinion anyway). They introduce the reader to the subject matter and nothing more. What a waste of time for me to sit there stressing about how to start the article. On more than one occasion I’ve spent more than an hour trying to come up with 2-3 paragraphs of text.  Talk about a productivity killer! Whether you’re struggling with a writing task, some code for a project, an email, or other tasks, jumping in without thinking too much is the best way to get started I’ve found. I’m not saying that you shouldn’t have an overall plan when jumping into a task, but on some occasions you’ll find that if you simply jump into the task and stop worrying about doing everything perfectly that things will flow more smoothly. For my introductory paragraph problem I give myself 5 minutes to write out some general concepts about what I know the article will cover and then spend another 10-15 minutes going back and refining that information. That way I actually have some ideas to work with rather than a blank sheet of paper. If I still find myself struggling I’ll write the rest of the article first and then circle back to the introductory paragraphs once I’m done. To sum this tip up: Jump into a task without thinking too hard about it. It’s better to to get the rock at the top of the hill rocking some than doing nothing at all. You can always go back and refine your work.   Learn a Productivity Technique and Stick to It There are a lot of different productivity programs and seminars out there being sold by companies. I’ve always laughed at how much money people spend on some of these motivational programs/seminars because I think that being productive isn’t that hard if you create a re-useable set of steps and processes to follow. That’s not to say that some of these programs/seminars aren’t worth the money of course because I know they’ve definitely benefited some people that have a hard time getting things done and staying focused. One of the best productivity techniques I’ve ever learned is called the “Pomodoro Technique” and it’s completely free. This technique is an extremely simple way to manage your time without having to remember a bunch of steps, color coding mechanisms, or other processes. The technique was originally developed by Francesco Cirillo in the 80s and can be implemented with a simple timer. In a nutshell here’s how the technique works: Pick a task to work on Set the timer to 25 minutes and work on the task Once the timer rings record your time Take a 5 minute break Repeat the process Here’s why the technique works well for me: It forces me to focus on a single task for 25 minutes. In the past I had no time goal in mind and just worked aimlessly on a task until I got interrupted or bored. 25 minutes is a small enough chunk of time for me to stay focused. Any distractions that may come up have to wait until after the timer goes off. If the distraction is really important then I stop the timer and record my time up to that point. When the timer is running I act as if I only have 25 minutes total for the task (like you’re down to the last 25 minutes before turning in your term paper….frantically working to get it done) which helps me stay focused and turns into a “beat the clock” type of game. It’s actually kind of fun if you treat it that way and really helps me focus on a the task at hand. I automatically know how much time I’m spending on a given task (more on this later) by using this technique. I know that I have 5 minutes after each pomodoro (the 25 minute sprint) to waste on anything I’d like including visiting a website, stepping away from the computer, etc. which also helps me stay focused when the 25 minute timer is counting down. I use this technique so much that I decided to build a program for Windows 8 called Pomodoro Focus (I plan to blog about how it was built in a later post). It’s a Windows Store application that allows people to track tasks, productive time spent on tasks, interruption time experienced while working on a given task, and the number of pomodoros completed. If a time estimate is given when the task is initially created, Pomodoro Focus will also show the task completion percentage. I like it because it allows me to track my tasks, time spent on tasks (very useful in the consulting world), and even how much time I wasted on tasks (pressing the pause button while working on a task starts the interruption timer). I recently added a new feature that charts productive and interruption time for tasks since I wanted to see how productive I was from week to week and month to month. A few screenshots from the Pomodoro Focus app are shown next, I had a lot of fun building it and use it myself to as I work on tasks.   There are certainly many other productivity techniques and processes out there (and a slew of books describing them), but the Pomodoro Technique has been the simplest and most effective technique I’ve ever come across for staying focused and getting things done.   Persistence is Key Getting things done is great but one of the biggest lessons I’ve learned in life is that persistence is key especially when you’re trying to get something done that at times seems insurmountable. Small tasks ultimately lead to larger tasks getting accomplished, however, it’s not all roses along the way as some of the smaller tasks may come with their own share of bumps and bruises that lead to discouragement about the end goal and whether or not it is worth achieving at all. I’ve been on several long-term projects over my career as a software developer (I have one personal project going right now that fits well here) and found that repeating, “Persistence is the key!” over and over to myself really helps. Not every project turns out to be successful, but if you don’t show persistence through the hard times you’ll never know if you succeeded or not. Likewise, if you don’t persistently stick to the process of creating a daily list, follow a productivity process, etc. then the odds of consistently staying productive aren’t good.   Track Your Time How much time do you actually spend working on various tasks? If you don’t currently track time spent answering emails, on phone calls, and working on various tasks then you might be surprised to find out that a task that you thought was going to take you 30 minutes ultimately ended up taking 2 hours. If you don’t track the time you spend working on tasks how can you expect to learn from your mistakes, optimize your time better, and become more productive? That’s another reason why I like the Pomodoro Technique – it makes it easy to stay focused on tasks while also tracking how much time I’m working on a given task.   Eliminate Distractions I blogged about this final tip several years ago but wanted to bring it up again. If you want to be productive (and ultimately successful at whatever you’re doing) then you can’t waste a lot of time playing games or on Twitter, Facebook, or other time sucking websites. If you see an article you’re interested in that has no relation at all to the tasks you’re trying to accomplish then bookmark it and read it when you have some spare time (such as during a pomodoro break). Fighting the temptation to check your friends’ status updates on Facebook? Resist the urge and realize how much those types of activities are hurting your productivity and taking away from your focus. I’ll admit that eliminating distractions is still tough for me personally and something I have to constantly battle. But, I’ve made a conscious decision to cut back on my visits and updates to Facebook, Twitter, Google+ and other sites. Sure, my Klout score has suffered as a result lately, but does anyone actually care about those types of scores aside from your online “friends” (few of whom you’ve actually met in person)? :-) Ultimately it comes down to self-discipline and how badly you want to be productive and successful in your career, life goals, hobbies, or whatever you’re working on. Rather than having your homepage take you to a time wasting news site, game site, social site, picture site, or others, how about adding something like the following as your homepage? Every time your browser opens you’ll see a personal message which helps keep you on the right track. You can download my ubber-sophisticated homepage here if interested. Summary Is there a single set of steps that if followed can ultimately lead to productivity? I don’t think so since one size has never fit all. Every person is different, works in their own unique way, and has their own set of motivators, distractions, and more. While I certainly don’t consider myself to be an expert on the subject of productivity, I do think that if you learn what steps work best for you and gradually refine them over time that you can come up with a personal productivity process that can serve you well. Productivity is definitely an “art” that anyone can learn with a little practice and persistence. You’ve seen some of the steps that I personally like to follow and I hope you find some of them useful in boosting your productivity. If you have others you use please leave a comment. I’m always looking for ways to improve.

    Read the article

  • Micro Focus lance Enterprise Developer Personal Edition, un outil gratuit pour le développement d'applications mainframe IBM

    Micro Focus lance Enterprise Developer Personal Edition Un outil gratuit pour le développement d'applications mainframe IBM Micro Focus, l'éditeur de solutions de gestion, de test et de modernisation d'applications d'entreprise, vient de sortir son IDE gratuit Enterprise Developer Personal Edition destiné aux développeurs professionnels et aux étudiants en informatique pour les applications mainframe IBM. Il s'agit en fait de la version d'entrée de gamme, très facile à utiliser, de la solution complète Micro Focus Enterprise Developer. Elle s'intègre à Eclipse ou Visual Studio pour en faire des outils de développement d'applications mainframe distribuées. Cette éditi...

    Read the article

  • How to drag from a background window to the front window

    - by Luis Alvarado
    Is the following I will explain possible with a key combination? Here is the image: As you can see, the terminal is the focus window (Front window) and Nautilus is in the background (Back Window). How can I grab a folder or file from Nautilus without loosing focus on the terminal (Without making the terminal go to the background and Nautilus to the front) and drop it in the terminal?. What I want is not to have to ALT+TAB again just to do this. Options like resizing the windows to fit the screen are not what I am looking for. Like in the image, we have a fullscreen window that we want it to stay like that. We can drag the terminal window around but anytime I access the background nautilus window, I should not loose focus on the terminal (It should not go to the background every time I access Nautilus). Maybe like a key combination that freezes the current focus windows positions and I can drag from background windows to background windows or background windows to the front focused one.

    Read the article

  • How can I make Liferea to open links in the background?

    - by sup
    I have Opera set as my default browser but it is the same for Firefox. When opening a link in Liferea, the link open in an external browser and the browser gets focus. I would like to open the links in background (so that the browser does not get focus). The only solution is to set Focus prevention level to Normal in the Focus & Raise Behaviour tab of General options in CCSM. But this messes things for other things. DO you have any other idea? I am using Unity on 11.10.

    Read the article

  • How do i keep a newly started program from taking focus?

    - by Jugglingnutcase
    Say i'm coding in emacs and want to start up a music program. Because it takes too long to start up i go back to coding and type away. When the music application starts up, the focus is stolen (gasp! stolen!) away from emacs and goes to the music application, often mid-thought. Is there any way to keep this from happening and have the newly started application not have focus until i see that it's up and ready to be used? Besides getting rid of my ADD of course. Or getting an impossibly fast computer that can keep up with my mind. i'm using a Windows XP system, but i will soon have a Windows 7 system, and i have Linux at home.

    Read the article

  • WPF ItemsControl - how to know when the items finished loading, so that I can focus the first one?

    - by Tomáš Kafka
    Hi everyone, I have an ItemsControl in my View, that is bound to an ObservableCollection from ViewModel. The collection is filled, and afterwards an event from VM to view is raised (think search results and SearchFinished event). I would like to move keyboard focus to the first item in an ItemsControl, but when I do it in View's code-behind when handling SearchFinished, the items are not yet rendered (the collection is filled already, but wpf's rendering is asynchronous and didn't happen yet), so there is nothing to focus (Focus() needs to have the items' visual tree already constructed). I wanted to do (myItemsControl.ItemContainerGenerator.ContainerFromIndex(0) as UIElement).Focus();, but as the 0th item is not yet loaded, ContainerFromIndex(0) returns null. I tried delaying it with Dispatcher.BeginInvoke... with low priority, but that is dependent on exact timing and usually doesn't work. How can I wait until the first item in ItemsControl is Loaded?

    Read the article

  • How to put focus on an element in jQuery?

    - by Prashant
    Hi, I have done the following code in JavaScript to put focus on the particular element (branch1 is a element), document.location.href="#branch1"; But as I am also using jQuery in my web app, so I want to do the above code in jQuery. I have tried but don't know why its not working, $("#branch1").focus(); The above jquery (focus()) code is not working for div, whereas If i am trying the same code with textbox, then its working, Please tell me, how can I put focus on a div elemnt using jQuery? Thanks!

    Read the article

  • Mouse and keyboard focus problem

    - by heffaklump
    I have two Chrome windows side by side. I click a link in window#1, ok. Now I want to switch to window#2 and click anywhere in the window. Noting happens. Sometimes the cursor switch to make-bigger-window style. If I click in the top part of current window. And then in the top part of next window I can switch focus so the other window works. Another problem is that the keyboard focus can get stuck in one window. I can click on things in one window but when using the keyboard it will change the first window. Only by closing the window that has the focus, it will release keyboard. What is this madness? Another problem not related is that sometimes I get logged out. Just like that.

    Read the article

  • Oracle Open World 2012?????

    - by Liu Maclean(???)
    Oracle Open World 2012?????: ???.. Oracle OpenWorld 2012 sessions????:Search Content Catalog for Oracle OpenWorld 2012 sessions ?????????session??? Open World 2012??: Larry ??Exadata X3 OOW 2012???Exadata X3,?? X3-2 ?Expansion Rack X3-2?X3-8 Exadata X3????:http://www.oracle.com/us/products/database/exadata/overview/index.html  ORACLE EXADATA Database MACHINE X3-8 sheetORACLE EXADATA Database MACHINE X3-2 sheet Exadata X3-2???????: X3-2?compute db node?????????8?Intel Xeon E5-2690??? ??????????12????16?,???33%????? ???96GB???128GB,????256GB ??????????50% X3-2 cell node??????????????Intel Xeon ??????flash card flash card??????4?,??flash card?????????40%? ???X3-2???22.4TB?flash ,??????flash????????????????????,???10????? CPU???6?,????????Intel Xeon model ????????X2-2??,???600GB???????3TB?????? ??Exadata X3-2?????????,??????????1/4?????,1/8????????????????? Exadata X3-8???????: X3-8???X2-8?????,???X3-8??????????X3-2??,??X3-8?????22.4TB?????? ???CEO??  Engineered to Work Together OOW????? Oracle Open World 2012 ????? Open World 2012 ??:http://www.oracle.com/openworld/index.htmlOpen World 2012 ????:http://www.oracle.com/openworld/register/packages/index.html ??: Sept. 30 – Oct. 4, 2012 9?30?? 10?4? ??:Moscone Center, San Francisco (747 Howard Street, San Francisco, California 94103). ?????Mark Hurd??OOW 2012: How big is oow OOW 2012?????????: Focus On Database Technologies Focus On Real Application Clusters Focus On Exadata Focus On Oracle Database Appliance Focus On Oracle Database Application Development Focus On Oracle Database Security Focus On Big Data Focus On Data Warehousing Focus On High Availability Focus On Oracle Enterprise Manager Cloud Control 12c (and Private Cloud) Focus On Oracle Spatial and Graph Focus On Oracle Database Utilities Focus On Oracle Database Upgrade Focus On Oracle Database Private Cloud Focus On .Net Focus On Oracle Database on Windows Focus On Engineered Systems Focus On Sunday Users Forum

    Read the article

  • Windows 7 Explorer - Activate mouse focus to be able to scroll in tree and file view?

    - by none
    I'd like to be able to scroll in the tree view without having to click in it. Is there a way to do this? I have once used a tool that generally gives focus to the window underneath the mouse cursor, but this caused some other glitches so I would like to achieve this without an extra tool. I also think that there are programs that embed the Windows Explorer and offer more features, including the behaviour I would like to have. But maybe a registry value change is all that is needed?

    Read the article

  • How to forbid keyboard shortcut stealing by websites in Firefox

    - by taw
    Many websites, especially everything involving rich text editing (this site is guilty as well), steal keyboard shortcuts normally used to control Firefox and make them do something else instead. It is totally infuriating when I press something like Cmd-number, Cmd-L, Cmd-T, or Cmd-K and it doesn't do what I want it to. Can I make it stop? Actually, it would probably be for the best if I could forbid stealing of all Cmd-* shortcuts. I've never seen them used for anything useful. Is it possible?

    Read the article

  • Pidgin script with Python/ Get Focus Signal

    - by Mr Alles
    I am creating a script in Python to integrate Pidgin with Unity (12.04), I've managed to do the counting notifications system using the Launcher API. But I dont know what event or signal is activated when the conversation window gains focus (To clear the message counter). I've tried some of the signals available on the documentation of Pidgin but none of them worked. Is there any GTK(or anything) event that is triggered when the window chat gets focus?

    Read the article

  • How to set the initial component focus

    - by frank.nimphius
    Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} In ADF Faces, you use the af:document tag's initialFocusId to define the initial component focus. For this, specify the id property value of the component that you want to put the initial focus on. Identifiers are relative to the component, and must account for NamingContainers. You can use a single colon to start the search from the root, or multiple colons to move up through the NamingContainers - "::" will pop out of the component's naming container and begin the search from there, ":::" will pop out of two naming containers and begin the search from there. Alternatively you can add the naming container IDs as a prefix to the component Id, e.g. nc1:nc2:comp1. http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e12419/tagdoc/af_document.html To set the initial focus to a component located in a page fragment that is exposed through an ADF region, keep in mind that ADF Faces regions - af:region - is a naming container too. To address an input text field with the id "it1" in an ADF region exposed by an af:region tag with the id r1, you use the following reference in af:document: <af:document id="d1" initialFocusId="r1:0:it1"> Note the "0" index in the client Id. Also, make sure the input text component has its clientComponent property set to true as otherwise no client component exist to put focus on.

    Read the article

  • jQuery: On form input focus, show div. hide div on blur (with a caveat)

    - by Lyon
    Hi, I am able to make a hidden div show/hide when an input field is in focus/blur using the following code: $('#example').focus(function() { $('div.example').css('display','block'); }).blur(function() { $('div.example').fadeOut('medium'); }); The problem is I want div.example to continue to be visible when the user is interacting within this div. E.g. click, or highlighting the text etc. within div.example. However div.example fades out whenever the input is not in focus and the mouse is interacting with elements within the div. The html code for the input and div elements is as follows: <p> <label for="example">Text:</label> <input id="example" name="example" type="text" maxlength="100" /> <div class="example">Some text...<br /><br />More text...</div> </p> How do I make it such that the div.example only disappears when the user clicks outside the input and/or div.example? I tried experimenting with focusin/focusout to check the focus on <p> but that didn't work either. Would it matter that div.example is positioned directly below the input field #example using jQuery? The code that does that is as follows: var fieldExample = $('#example'); $('div.example').css("position","absolute"); $('div.example').css("left", fieldExample.offset().left); $('div.example').css("top", fieldExample.offset().top + fieldExample.outerHeight()); My apologies if this has been asked before, but the many show/hide div questions I read does not cover this. Thanks for your advice. :)

    Read the article

  • In Safari, using jQuery a Form Input Text Field does not receive focus after alert is displayed. Why

    - by Rob
    I have an ASPX web form. I use jQuery to simply my Javascript. I use a Javascript validation script to validate each of the form fields' values. If an error occurs, I popup an alert with an error message. Then I transfer focus to the underlying element. Here are examples I have tried. Using jQuery: var Form_FieldDef = function(name) { this.name = name; this.SetFocus = function() { $('#' + this.name)[0].focus(); } this.Validate = function() { var isvalid = true; if ( $.trim($('#' + this.name).val()) == '') { alert("Your entry is empty"); this.SetFocus(); isvalid = false; } return isvalid; } } This works on IE7, IE8, Opera, Chrome, and Firefox. It does not work on Safari 4 on PC. I don't have a Mac. So I changed the SetFocus method to this. this.SetFocus = function() { var fld = document.getElementById(this.name); if (fld != null) fld.focus(); } This works on IE7, IE8, Opera, Chrome, and Firefox. It does not work on Safari 4 on PC. I stepped through the code with VS 2008 debugger, and I'm calling the focus method on the underlying element.

    Read the article

  • How to prevent my C# winforms application from stealing focus when I set the visible properly to tru

    - by Fopedush
    I've got a C# winforms application that runs in the background, listening for hotkeys to be pressed. When a hotkey is pressed, my form makes a brief appearance. The form is always running, but set to hidden until I receive a hotkey event, at which time I set the visible property to true. The code looks like this: void hook_volumeDown(object sender, KeyPressedEventArgs e) { this.Visible = true; } It should be noted that the topmost property of this form is set to true. The really odd part is, after my C# app has stolen focus from another application, it will never do it again. For example: I launch my app, then launch some fullscreep app like Team Fortress 2. Then I press my hotkey. Team Fortress 2 minimizes, and I see my form. Then, however, I can restore TF2, and press my hotkey again all I want (with the desired effect), and TF2 will remain focused. At any rate, I'm looking for a way to fix this. I've found a lot of questions here covering similar problems, but all of them are related to creating/launching a new form, not making an existing one visible (unless I missed something). I could rework the application to create a new form every time I need one, but that would entail creating yet another form to be invisible all the time just to wait for hotkey events, so I'd rather leave it as it is. Any ideas?

    Read the article

  • How to let parent control know that its child got focus?

    - by Axarydax
    Hi there, imagine that I have a Form with 9 controls (TabbedStuffControl) in a 3x3 tile, and these controls contain TabControls containing another control (StuffControl) with ListBoxes and TextBoxes. I'd like to know a proper way to let TabbedStuffControl that its child has received a focus? e.g. user clicks into a textbox of StuffControl or drags something to listbox of StuffControl. Eventually the Form should know which TabbedStuffControl is active Do I need to hook up GotFocus event of TextBoxes and ListBoxes and TabControls, then dispatch another event to finally let Form know who got focus? I think that there should be a simpler way - that somehow TabbedStuffControl knows that its child got focus, so there would be only one place in code that I'll hook up. Thanks.

    Read the article

  • Is there a reliable way to activate / set focus to a window using C#?

    - by gtaborga
    Hey everyone, I'm trying to find a reliable way to activate / set focus a window using C#. Currently I'm attempting to achieve this using the following Windows API calls: SetActiveWindow(handle); SwitchToThisWindow(handle, true); Previously I also had ShowWindow(handle, SW_SHOWMAXIMIZED); executing before the other 2, but removed it because it was causing strange behavior. The problem I'm having with my current implementation is that occasionally the focus will not be set correctly. The window will become visible but the top part of it will still appear grayed out as if it wasn't in focus. Is there a way to reliably do this which works 100% of the time, or is the inconsistent behavior a side-effect I can't escape? Please let me know if you have any suggestions or implementations that always work. Thank you for your time.

    Read the article

  • Do I really have to call Focus in OnMouseDown of my custom Control?

    - by Thomas
    I'm implementing a custom control that inherits from Control. I want it to be focusable (it's a kind of list box). In the constructor, I do SetStyle(ControlStyles.Selectable, true); I can now use Tab to navigate to the control. However, when the control receives a mouse click, it does not automatically claim focus. I can work around this, of course: protected override void OnMouseDown(MouseEventArgs e) { Focus(); base.OnMouseDown(e); } But this feels like a kludge that should not be necessary. Is this really the way to go? Or is there some way to tell Control to claim focus automatically when it receives a mouse click?

    Read the article

  • The Increasing Focus on Architecture

    - by Bob Rhubart
    If you follow my updates on Twitter or on the OTN ArchBeat page on Facebook you have probably noticed that I'm a regular reader of Joe McKendrick's SOA blog on ZDNet. Usually I'm content to simply share a link on my social networks when I find one of McKendrick's posts interesting. But with a recent post, In the cloud era, let's start calling IT what it is: 'Innovation Team', McKendrick hit on a point that warrants more than a quick link: "IT is no longer just a department full of people who code, build and maintain systems. IT is the business partner that plans and strategizes what types of technology solutions the business needs to move forward." Of course, what McKendrick is describing is an increased focus on architecture. Assuming that McKendrick's assessment is correct — and I do — that expanding focus, from coding, building, and maintaining systems to planning and strategizing technology solutions that serve the business, isn't limited to the organizational level. The individual roles within the IT organization will also have to shift to a more broadly architectural mindset. McKendrick's post references Dr. Irving Wladawsky-Berger's assessment of cloud computing as a critical "third model" of computing to emerge in the 50-year history of Information Technology. As computing itself evolves, the underlying roles that make computing possible must evolve accordingly. That evolution will be defined by an increased focus on architecture.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >