Search Results

Search found 10662 results on 427 pages for 'cursor position'.

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

  • Custom Message Box: Windows' "Move Cursor to Default Button" Feature

    - by Andreas Rejbrand
    In Microsoft Windows, there is a (highly useful) feature that automatically moves the cursor to the default button of a modal dialog box (activated in Win+R, "control mouse"). Now I have created a custom dialog box in Delphi (basically a TForm), see below. But, quite naturally, the cursor does not automatically move to the default button ("Yes" in this case), even though the feature is turned on in "control mouse". How to implement this feature using Windows API? I guess it would be sufficient to obtain the settings as a boolean (true if feature activated, false if not), and then simply move the cursor programmatically using SetCursorPos if true. But how to obtain this setting?

    Read the article

  • Vb net textbox cursor position always 0 after databinding

    - by user1166557
    please help me with the following if you can, i have the simple following command me.textbox1.databindings.clear me.textbox1.databindings.add("text",TicketsBindingSource,"TicketSubject") the command exeutes succesfully and i can see in the textbox the title, BUT once i click on the textbox1 the position of the cursor it's always moving to the position 0 and not to the area of the textbox i clicked. For example my textbox has the following text: "Hello World". If i click with my mouse inside the textbox at the letter W or anywhere i click the cursor is moving to the 0 index. eg. at the beggining , in order to move my cursor left or right i have to do that with my keyboard arrows keys, Dose anybody know how i can solve this issue?

    Read the article

  • create temporary table from cursor

    - by Claudiu
    Is there any way, in PostgreSQL accessed from Python using SQLObject, to create a temporary table from the results of a cursor? Previously, I had a query, and I created the temporary table directly from the query. I then had many other queries interacting w/ that temporary table. Now I have much more data, so I want to only process 1000 rows at a time or so. However, I can't do CREATE TEMP TABLE ... AS ... from a cursor, not as far as I can see. Is the only thing to do something like: rows = cur.fetchmany(1000); cur2 = conn.cursor() cur2.execute("""CREATE TEMP TABLE foobar (id INTEGER)""") for row in rows: cur2.execute("""INSERT INTO foobar (%d)""" % row) or is there a better way? This seems awfully inefficient.

    Read the article

  • How to scroll to the new added item in a ListView

    - by Thomas
    Hi all My application show a ListView with a button which allow user to add an element. When the user clicks on this button, another Activity is started to allow user to populate the new element. When the add is finished, we return to the previous Activity with the ListView and I would like to scroll to the new element. Note that this element is not necessarily at the end of the ListView because there is an "order by" when I retrieve the datas from the database. I know I need the cursor position of the new element to make the ListView scrool to it, but the only info I have about this element is its id, so how to convert this id to cursor position ? Do I have to loop on the cursor to find the position ? Thanks in advance

    Read the article

  • How to position an element next to another an element of undefined position?

    - by allin
    Hi, I am very new to html/xml/css and I'm trying my best to teach myself. However, I have run into a problem that a Google search could not solve. I would like to position a small image in a fixed location relative to another element(?) I believe this is the code of the element i want to position the second element relative to. #wrap { width:550px; background-color:#fff; margin:0 auto; padding:0; border-right:1px solid #ccc; border-left:1px solid #ccc; } #container { width: 500px; margin:0 auto; padding: 25px; font-size:.85em; background-color: #fff; } and this is partial code I'm trying to edit to position .xyz to the right of "#wrap" .xyz { position: ???; top: 200px; right: ???; _position: ???; _margin: ???; _text-align: right; z-index: 1337; } my search of SOF has lead me to believe i'm supposed to do something along the lines of this - http://stackoverflow.com/questions/104953/position-an-html-element-relative-to-its-container-using-css - but i haven't been able to. I greatly appreciate any help you may offer. Hopefully I've explained my problem properly.

    Read the article

  • How to set the cursor in kEventControlSetCursor?

    - by fret
    I want to be able to change the appearance of the mouse cursor as it moves over various hot spots in my view's and it seems to me that I should be doing that in the kEventControlSetCursor handler (which I can get). The function "SetCursor" is deprecated, which leads to the question, what do I call to actually change the cursor? And is there some standard list of cursors I can use? Things like horizontal and vertical arrows? I beam?

    Read the article

  • C# Hide Resize Cursor

    - by Ozzy
    In my program, im using the WndProc override to stop my form being resized. Thing is, the cursor is still there when you move the pointer to the edge of the form. Is there anyway to hide this cursor?

    Read the article

  • Android horizontal scrolling showing Cursor data

    - by androidharry
    I have some text data in database which I have retrieved in a Cursor, and I am displaying it in a ListView. What I want to do now is that when you select click a particular row in the list its text content should be displayed in full screen and the user should be able to scroll horizontally (like scrolling between iPhone home screens) to view the contents of the Cursor.

    Read the article

  • How do I change the cursor and its size?

    - by Thomas Le Feuvre
    I have recently created an Ubuntu 12.04 partition on my Windows 7 laptop. When installing it, I switched to "high contrast" mode, which has rather large cursors (by large I mean about twice as large and thick as they should normally are). Now I have successfully installed the partition, the large cursors have stuck around even after exiting this high contrast mode, but only when I am hovering over stuff e.g. hovering over text inputs, links, and when resizing windows. All of these cursors are too large. They cursor is only normally sized when the computer should be displaying the normal mouse pointer. Does anyone know how I might go about fixing this?

    Read the article

  • How can I fix a shaky touchpad cursor in Ubuntu on my hp pavilion laptop?

    - by Vindiggity
    I recently installed Ubuntu 12.04 on my laptop and it works great, except after the initial reboot my touchpad cursor shakes violently when I hold my finger completely still on the pad.It works fine with a regular mouse plugged in. I couldn't find much scouting around the internet except that it might be that my touchpad doesn't have any dead zones? I am very new to Ubuntu and am fairly computer savvy, but I don't know a lot about using the terminal or anything like that, so if you could dumb down a fix for this as much as possible for me, I'd greatly appreciate it.

    Read the article

  • How do I implement Hibernate Pagination using a cursor (so the results stay consistent, despite new

    - by hunterae
    Hey all, Is there any way to maintain a database cursor using Hibernate between web requests? Basically, I'm trying to implement pagination, but the data that is being paged is consistently changing (i.e. new records are added into the database). We are trying to set it up such that when you do your initial search (returning a maximum of 5000 results), and you page through the results, those same records always appear on the same page (i.e. we're not continuously running the query each time next and previous page buttons are clicked). The way we're currently implementing this is by merely selecting 5000 (at most) primary keys from the table we're paging, storing those keys in memory, and then just using 20 primary keys at a time to fetch their details from the database. However, we want to get away from having to store these keys in memory and would much prefer a database cursor that we just keep going back to and moving backwards and forwards over the cursor to generate pages. I tried doing this with Hibernate's ScrollableResults but found that I could not call methods like next() and previous() would cause an exception if you within a different web request / Hibernate session (no surprise there). Is there any way to reattach a ScrollableResults object to a Session, much the same way you would reattach a detached database object to make it persistent? Are there any other approaches to implement this data paging with consistent paging results without caching the primary keys?

    Read the article

  • C# textbox cursor positioning

    - by Jim
    I feel like I am just missing a simple property, but can you set the cursor to the end of a line in a textbox? private void txtNumbersOnly_KeyPress(object sender, KeyPressEventArgs e) { if (Char.IsDigit(e.KeyChar) || e.KeyChar == '\b' || e.KeyChar == '.' || e.KeyChar == '-') { TextBox t = (TextBox)sender; bool bHandled = false; _sCurrentTemp += e.KeyChar; if (_sCurrentTemp.Length > 0 && e.KeyChar == '-') { // '-' only allowed as first char bHandled = true; } if (_sCurrentTemp.StartsWith(Convert.ToString('.'))) { // add '0' in front of decimal point t.Text = string.Empty; t.Text = '0' + _sCurrentTemp; _sCurrentTemp = t.Text; bHandled = true; } e.Handled = bHandled; } After testing for '.' as first char, the cursor goes before the text that is added. So instead of "0.123", the results are "1230." without moving the cursor myself. I also apologize if this is a duplicate question.

    Read the article

  • CSS Position Help (horizontal sidebar showing up when animate content over)

    - by jstacks
    Let me try my best to explain what I'd like to have happen, show you the code I have an hopefully I can get some help. So, I'm trying to do a sliding navigation UI from the left side of the screen (like a lot of mobile apps). The main content slides over, displaying the navigation menu beneath. Right now the browser thinks the screen is getting wider and introduces a horizontal scroll bar. However, I don't want that to happen... How do I get the div to animate off screen but not enlarge the width of the screen (i.e. keep it partially off screen)? Anyway here is my fiddle: http://jsfiddle.net/2vP67/6/ And here is the code within the post: HTML <div id='wrapper'> <div id='navWide'> </div> <div id='containerWide'> </div> <div id='containerTall'> <div id='container'> <div id='nav'> <div id='navNavigate'> Open Menu </div> <div id='navNavigateHide'> Close Menu </div> </div> </div> </div> <div id='sideContainerTall'> <div id='sideContainer'> <div id='sideNav'>Side Navigation </div> </div> </div> </div> CSS #wrapper { width:100%; min-width:1000px; height:100%; min-height:100%; position:relative; top:0; left:0; z-index:0; } #navWide { color: #ffffff; background:#222222; width:100%; min-width:1000px; height:45px; position:fixed; top:0; left:0; z-index:100; } #containerWide { width:100%; min-width:1000px; min-height:100%; position:absolute; top:45px; z-index:100; } #containerTall { color: #000000; background:#dadada; width:960px; min-height:100%; margin-left:-480px; position:absolute; top:0; left:50%; z-index:1000; } /***** main container *****/ #container { width:960px; min-height:585px; } #nav { color: #ffffff; background:#222222; width:960px; height:45px; position:fixed; top:0; z-index:10000; } #navNavigate { background:yellow; font-size:10px; color:#888888; width:32px; height:32px; padding:7px 6px 6px 6px; float:left; cursor:pointer; } #navNavigateHide { background:yellow; font-size:10px; color:#888888; width:32px; height:32px; padding:7px 6px 6px 6px; float:left; cursor:pointer; display:none; } #sideContainerTall { background:#888888; width:264px; min-height:100%; margin-left:-480px; position:absolute; top:0; left:50%; z-index:500; } #sideContainer { width:264px; min-height:585px; display:none; } #sideContainerTall { background:#888888; width:264px; min-height:100%; margin-left:-480px; position:absolute; top:0; left:50%; z-index:500; } #sideContainer { width:264px; min-height:585px; display:none; } #sideNav { width:264px; height:648px; float:left; } Javascript $(document).ready(function() { $('div#navNavigate').click(function() { $('div#navNavigate').hide(); $('div#navNavigateHide').show(); $('div#sideContainer').show(); $('div#containerTall').animate({ 'left': '+=264px' }); }); $('div#navNavigateHide').click(function() { $('div#navNavigate').show(); $('div#navNavigateHide').hide(); $('div#containerTall').animate({ 'left': '-=264px' }, function() { $('div#sideContainer').hide(); }); }); });

    Read the article

  • IDENTITY_INSERT ON inside of cursor does not allow inserted id

    - by Mac
    I am trying to set some id's for a bunch of rows in a database where the id column is an identity. I've created a cursor to loop through the rows and update the ids with incrementing negative numbers (-1,-2,-3 etc). When I updated just one row turning on the IDENTITY_INSERT it worked fine but as soon as I try and use it in a cursor, it throws the following error. Msg 8102, Level 16, State 1, Line 22 Cannot update identity column 'myRowID'. DECLARE @MinId INT; SET @MinId = (SELECT MIN(myRowId) FROM myTable)-1; DECLARE myCursor CURSOR FOR SELECT myRowId FROM dbo.myTable WHERE myRowId > 17095 OPEN myCursor DECLARE @myRowId INT FETCH NEXT FROM myCursor INTO @myRowId WHILE (@@FETCH_STATUS <> -1) BEGIN SET IDENTITY_INSERT dbo.myTable ON; --UPDATE dbo.myTable --SET myRowId = @MinId --WHERE myRowId = @myRowId; PRINT (N'ID: ' + CAST(@myRowId AS VARCHAR(10)) + N' NewID: ' + CAST(@MinId AS VARCHAR(4))); SET @MinId = @MinId - 1; FETCH NEXT FROM myCursor INTO @myRowId END CLOSE myCursor DEALLOCATE myCursor GO SET IDENTITY_INSERT dbo.myTable OFF; GO Does anyone know what I'm doing wrong?

    Read the article

  • Selecting and inserting text at cursor location in textfield with JS/jQuery

    - by IceCreamYou
    Hello. I have developed a system in PHP which processes #hashtags like on Twitter. Now I'm trying to build a system that will suggest tags as I type. When a user starts writing a tag, a drop-down list should appear beneath the textarea with other tags that begin with the same string. Right now, I have it working where if a user types the hash key (#) the list will show up with the most popular #hashtags. When a tag is clicked, it is inserted at the end of the text in the textarea. I need the tag to be inserted at the cursor location instead. Here's my code; it operates on a textarea with class "facebook_status_text" and a div with class "fbssts_floating_suggestions" that contains an unordered list of links. (Also note that the syntax [#my tag] is used to handle tags with spaces.) maxlength = 140; var dest = $('.facebook_status_text:first'); var fbssts_box = $('.fbssts_floating_suggestions'); var fbssts_box_orig = fbssts_box.html(); dest.keyup(function(fbss_key) { if (fbss_key.which == 51) { fbssts_box.html(fbssts_box_orig); $('.fbssts_floating_suggestions .fbssts_suggestions a').click(function() { var tag = $(this).html(); //This part is not well-optimized. if (tag.match(/W/)) { tag = '[#'+ tag +']'; } else { tag = '#'+ tag; } var orig = dest.val(); orig = orig.substring(0, orig.length - 1); var last = orig.substring(orig.length - 1); if (last == '[') { orig = orig.substring(0, orig.length - 1); } //End of particularly poorly optimized code. dest.val(orig + tag); fbssts_box.hide(); dest.focus(); return false; }); fbssts_box.show(); fbssts_box.css('left', dest.offset().left); fbssts_box.css('top', dest.offset().top + dest.outerHeight() + 1); } else if (fbss_key.which != 16) { fbssts_box.hide(); } }); dest.blur(function() { var t = setTimeout(function() { fbssts_box.hide(); }, 250); }); When the user types, I also need get the 100 characters in the textarea before the cursor, and pass it (presumably via POST) to /fbssts/load/tags. The PHP back-end will process this, figure out what tags to suggest, and print the relevant HTML. Then I need to load that HTML into the .fbssts_floating_suggestions div at the cursor location. Ideally, I'd like to be able to do this: var newSuggestions = load('/fbssts/load/tags', {text: dest.getTextBeforeCursor()}); fbssts_box.html(fbssts_box_orig); $('.fbssts_floating_suggestions .fbssts_suggestions a').click(function() { var tag = $(this).html(); if (tag.match(/W/)) { tag = tag +']'; } dest.insertAtCursor(tag); fbssts_box.hide(); dest.focus(); return false; }); And here's the regex I'm using to identify tags (and @mentions) in the PHP back-end, FWIW. %(\A(#|@)(\w|(\p{L}\p{M}?))+\b)|((?<=\s)(#|@)(\w|(\p{L}\p{M}?))+\b)|(\[(#|@).+?\])%u Right now, my main hold-up is dealing with the cursor location. I've researched for the last two hours, and just ended up more confused. I would prefer a jQuery solution, but beggars can't be choosers. Thanks!

    Read the article

  • ListView - Index and Position Behavior upon restart()

    - by tunneling
    I am using a ListView with an ArrayAdapter that holds objects. When I select an item, I am capturing the position and index of the selected item. If I scroll down prior to selection, the position and index represent the location of the item in the list. Selecting that items takes me to another activity. When I use the back button to return to the list, it seems that the ListView get's a new position and index for the visible items. As a result, I can't figure out how to reference the selected item during the restart() of the ListView Activity. I have tried to caputure position and index, but as I've said, they change upon returning to the Activity. Is my understanding of the ListView "redraw" correct? Does it renumber my items based on what's visible? -When in the life cycle is getView() called? Is there a way to force an update to the ListView so that my caputured index still points to the same object? Thanks, Jason

    Read the article

  • Getting keypress cursor co-ordinates

    - by nijikunai
    I'm writing a simple browser based ide with intellisense (code completion) support. So whenever the user inserts a dot (.) character, I need to display a div element (as context menu) near the cursor. Can this can be done and if yes how? Thanks in advance!

    Read the article

  • Set caret position in contenteditable div layer in Chrome/webkit

    - by Alex
    Hello, I'm trying to set the caret position in a contenteditable div layer, and after a bit of searching the web and experimenting I got it to work in firefox using this: function set(element,position){ element.focus(); var range= window.getSelection().getRangeAt(0); range.setStart(element.firstChild,position); range.setEnd(element.firstChild,position); } [...] set(document.getElementById("test"),3); But in Chrome/webkit it selects all of the content in the div. Is this a bug with webkit or am I doing something wrong? Thank you in advance.

    Read the article

  • update table using cursor but also update records in another table

    - by Bucket
    I'm updating the IDs with new IDs, but I need to retain the same ID for the master record in table A and its dependents in table B. The chunk bracketed by comments is the part I can't figure out. I need to update all the records in table B that share the same ID with the current record I'm looking at for table A. DECLARE CURSOR_A CURSOR FOR SELECT * FROM TABLE_A FOR UPDATE OPEN CURSOR_A FETCH NEXT FROM CURSOR_A WHILE @@FETCH_STATUS = 0 BEGIN BEGIN TRANSACTION UPDATE KEYMASTERTABLE SET RUNNING_NUMBER=RUNNING_NUMBER+1 WHERE TRANSACTION_TYPE='TABLE_A_NEXT_ID' -- FOLLOWING CHUNK IS WRONG!!! UPDATE TABLE_B SET TABLE_B_ID=(SELECT RUNNING_NUMBER FROM KEYMASTERTABLE WHERE TRANSACTION_TYPE='TABLE_A_NEXT_ID') WHERE TABLE_B_ID = (SELECT TABLE_A_ID FROM CURRENT OF CURSOR A) -- END OF BAD CHUNK UPDATE TABLE_A SET TABLE_A_ID=(SELECT RUNNING_NUMBER FROM KEYMASTERTABLE WHERE TRANSACTION_TYPE='TABLE_A_NEXT_ID') WHERE CURRENT OF CURSOR_A COMMIT FETCH NEXT FROM CURSOR_A END CLOSE CURSOR_A DEALLOCATE CURSOR_A GO

    Read the article

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