Search Results

Search found 2876 results on 116 pages for 'cursor'.

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

  • Silverlight 3.0 Custom Cursor in Chart

    - by Wonko the Sane
    Hello All, I'm probably overlooking something that will be obvious when I see the solution, but for now... I am attempting to use a custom cursor inside the chart area of a Toolkit chart. I have created a ControlTemplate for the chart, and a grid to contain the cursors. I show/hide the cursors, and attempt to move the containing Grid, using various Mouse events. The cursor is being displayed at the correct times, but I cannot get it to move to the correct position. Here is the ControlTemplate (the funky colors are just attempts to confirm what the different pieces of the template pertain to): <dataVisTK:Title Content="{TemplateBinding Title}" Style="{TemplateBinding TitleStyle}"/> <Grid Grid.Row="1"> <!-- Remove the Legend --> <!--<dataVisTK:Legend x:Name="Legend" Title="{TemplateBinding LegendTitle}" Style="{TemplateBinding LegendStyle}" Grid.Column="1"/>--> <chartingPrimitivesTK:EdgePanel x:Name="ChartArea" Background="#EDAEAE" Style="{TemplateBinding ChartAreaStyle}" Grid.Column="0"> <Grid Canvas.ZIndex="-1" Background="#2008AE" Style="{TemplateBinding PlotAreaStyle}"> </Grid> <Border Canvas.ZIndex="1" BorderBrush="#FF250010" BorderThickness="3" /> <Grid x:Name="gridHandCursors" Canvas.ZIndex="5" Width="32" Height="32" Visibility="Collapsed"> <Image x:Name="cursorGrab" Width="32" Source="Resources/grab.png" /> <Image x:Name="cursorGrabbing" Width="32" Source="Resources/grabbing.png" Visibility="Collapsed"/> </Grid> </chartingPrimitivesTK:EdgePanel> </Grid> </Grid> </Border> and here are the mouse events (in particular, the MouseMove): void TimelineChart_Loaded(object sender, RoutedEventArgs e) { chartTimeline.UpdateLayout(); List<FrameworkElement> chartChildren = GetLogicalChildrenBreadthFirst(chartTimeline).ToList(); mChartArea = chartChildren.Where(element => element.Name.Equals("ChartArea")).FirstOrDefault() as Panel; if (mChartArea != null) { grabCursor = chartChildren.Where(element => element.Name.Equals("cursorGrab")).FirstOrDefault() as Image; grabbingCursor = chartChildren.Where(element => element.Name.Equals("cursorGrabbing")).FirstOrDefault() as Image; mGridHandCursors = chartChildren.Where(element => element.Name.Equals("gridHandCursors")).FirstOrDefault() as Grid; mChartArea.Cursor = Cursors.None; mChartArea.MouseMove += new MouseEventHandler(mChartArea_MouseMove); mChartArea.MouseLeftButtonDown += new MouseButtonEventHandler(mChartArea_MouseLeftButtonDown); mChartArea.MouseLeftButtonUp += new MouseButtonEventHandler(mChartArea_MouseLeftButtonUp); if (mGridHandCursors != null) { mChartArea.MouseEnter += (s, e2) => mGridHandCursors.Visibility = Visibility.Visible; mChartArea.MouseLeave += (s, e2) => mGridHandCursors.Visibility = Visibility.Collapsed; } } } void mChartArea_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (grabCursor != null) grabCursor.Visibility = Visibility.Visible; if (grabbingCursor != null) grabbingCursor.Visibility = Visibility.Collapsed; } void mChartArea_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (grabCursor != null) grabCursor.Visibility = Visibility.Collapsed; if (grabbingCursor != null) grabbingCursor.Visibility = Visibility.Visible; } void mChartArea_MouseMove(object sender, MouseEventArgs e) { if (mGridHandCursors != null) { Point pt = e.GetPosition(null); mGridHandCursors.SetValue(Canvas.LeftProperty, pt.X); mGridHandCursors.SetValue(Canvas.TopProperty, pt.Y); } } Any help past this roadblock would be greatly appreciated! Thanks, wTs

    Read the article

  • Fetch and bulk collect from a REF CURSOR returned by a procedure

    - by Rachcha
    I have a procedure that has a SYS_REFCURSOR as an OUT parameter. The signature is, for example, as follows: PROCEDURE myProc(p_someID IN INTEGER, p_cursor OUT SYS_REFCURSOR); I call this procedure from a function, where I have to copy a column named clientID from the p_cursor to a scalar nested table. I am doing as follows: CREATE OR REPLACE FUNCTION myFunction RETURN sys_refcursor IS someID INTEGER := 1234; myCursor SYS_REFCURSOR; TYPE t_clientID_nt IS TABLE OF NUMBER(16,0); clientID_nt t_clientID_nt; otherID SYS_REFCURSOR; BEGIN myProc (someID, myCursor); FOR i IN myCursor LOOP clientID_nt.EXTEND; clientID_nt (clientID_nt.COUNT) := i.clientID; END LOOP; -- Other code that opens the cursor otherID -- based on the IDs in clientID_nt ... ... RETURN otherID; END; / When I try to compile this function, the error I get is: PLS-00221: 'CLIENTID_NT' is not a procedure or is undefined and it is at line 11 of the code. Any help on how to fetch and bulk collect from such a cursor is greatly appreciated.

    Read the article

  • MySQL Cursor Issue

    - by James Inman
    I've got the following code - this is the first time I've really attempted using cursors. DELIMITER $$ DROP PROCEDURE IF EXISTS demo$$ DROP TABLE IF EXISTS temp$$ CREATE TEMPORARY TABLE temp( id INTEGER NOT NULL AUTO_INCREMENT, start DATETIME NOT NULL, end DATETIME NOT NULL, PRIMARY KEY(id) ) $$ CREATE PROCEDURE demo() BEGIN DECLARE done INT DEFAULT 0; DECLARE a, b DATETIME; DECLARE cur1 CURSOR FOR SELECT MAX(end) AS end FROM ( SELECT id, start, end, @r := @r + (start > @edate) AS num, @edate := GREATEST(@edate, end) FROM ( SELECT @r := 0, @edate := '0001-01-01' ) vars, student_lectures WHERE ( student_id = 1 AND start >= '2010-04-26 00:00:00' AND end <= '2010-04-30 23:59:59' ) ORDER BY start ) q GROUP BY num; DECLARE cur2 CURSOR FOR SELECT MIN(start) AS start FROM ( SELECT id, start, end, @r := @r + (start > @edate) AS num, @edate := GREATEST(@edate, end) FROM ( SELECT @r := 0, @edate := '0001-01-01' ) vars, student_lectures WHERE ( student_id = 1 AND start >= '2010-04-26 00:00:00' AND end <= '2010-04-30 23:59:59' ) ORDER BY start ) q GROUP BY num LIMIT 1, 18446744073709551615; DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1; OPEN cur1; OPEN cur2; REPEAT FETCH cur1 INTO a; FETCH cur2 INTO b; IF NOT done THEN INSERT INTO temp(start, end) VALUES(a,b); END IF; UNTIL done END REPEAT; CLOSE cur1; CLOSE cur2; END $$ SELECT * FROM temp; I'm not getting anything outputted into the temp table. Running the following query gives me output, so I know there's rows it should be matching - but I imagine I've made some obvious mistake. SELECT MAX(end) AS end FROM ( SELECT id, start, end, @r := @r + (start > @edate) AS num, @edate := GREATEST(@edate, end) FROM ( SELECT @r := 0, @edate := '0001-01-01' ) vars, student_lectures WHERE ( student_id = 1 AND start >= '2010-04-26 00:00:00' AND end <= '2010-04-30 23:59:59' ) ORDER BY start ) q GROUP BY num; The output this query returns: +---------------------+ | end | +---------------------+ | 2010-04-26 13:00:00 | | 2010-04-26 18:15:00 | | 2010-04-27 11:00:00 | | 2010-04-27 13:00:00 | | 2010-04-27 18:15:00 | | 2010-04-28 13:00:00 | | 2010-04-29 13:00:00 | | 2010-04-29 18:15:00 | | 2010-04-30 13:00:00 | | 2010-04-30 15:15:00 | | 2010-04-30 17:15:00 | +---------------------+ 11 rows in set (0.02 sec)

    Read the article

  • Oracle output: cursor, file, or very long string?

    - by Klay
    First, the setup: I have a table in an Oracle10g database with spatial columns. I need to be able to pass in a spatial reference so that I can reproject the geometry into an arbitrary coordinate system. Ultimately, I need to compress the results of this projection to a zip file and make it available for download through a Silverlight project. I would really appreciate ideas as to the best way to accomplish this. In the examples below, the SRID is the Spatial reference ID integer used to convert the geometric points into a new coordinate system. In particular, I can see a couple of possibilities. There are many more, but this is an idea of how I'm thinking: a) Pass SRID to a dynamic view -- perform projection, output a cursor -- send cursor to UTL_COMPRESS -- write output to a file (somehow) -- send URL to Silverlight app b) Use SRID to call Oracle function from Silverlight app -- perform projection, output a string -- build strings into a file -- compress file using SharpZipLib library in .NET -- send bytestream back to Silverlight app I've done the first two steps of b), and the conversion of 100 points took about 7 seconds, which is unacceptably slow. I'm hoping it would be faster doing the processing totally in Oracle. If anyone can see potential problems with either way of doing this, or can suggest a better way, it would be very helpful. Thanks!

    Read the article

  • Programatically change cursor speed in windows

    - by Juan Manuel Formoso
    Since getting a satisfactory answer on SuperUser is very difficult, I want to rephrase this question and ask: Is there any way to programatically detect a mouse was plugged in the usb port, and change the cursor speed in windows (perhaps through an API)? I'd like to use C#, but I'm open to any language that can run on a windows 7 machine.

    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

  • Blackberry - Custom EditField Cursor

    - by varun
    Hi, I am new to Blackberry Development.This is my first Question for you people. I am creating a search box for my project. But it looks like blackberry doesn't have an internal api for creating single line Edit field. I have created a Custom Field by extending BasciEditField overriding methods like layout, paint. In paint i am drawing a rectangle with getpreferred width and height. But the cursor is coming at default position (top-left) in Edit Field. Can any body tell me how i can draw it where my text is(i.e in middle of Edit Field by calling drwaText()). Thanks,

    Read the article

  • Mouse pointer size problem

    - by Rasmus Pedersen
    My mouse cursor is double the normal size. Its only the default pointer that is enlarged. Variations like resize, busy and so on are the correct size. The problem persists even when I change cursor theme. If I move the cursor inside a Firefox window it changes to the correct size. My resolution is 2560x1440, its a single screen setup. Nvidia-settings reports my DPI to be: 108x107. I've tired to force that DPI in the LightDM conf, since I figured it must have something to-do with the DPI calculation. I have tried to change the cursor size through dconf but the problem still remains. I haven't seen this problem before, it arrived after the upgrade from Beta 2 to release version of Ubuntu 11.10. Anybody got any idea what the problem might be, its pretty annoying with the huge cursor.

    Read the article

  • When using Zoom, cursor disappears

    - by Lea
    In Ubuntu 12.04 Unity, when I use the Compiz Zoom feature, the mouse cursor disappears. This did not happen in 10.04, it worked great until I installed 12.04. In 12.04 zoom was disabled by default, so I re-enabled it to use Super+scroll wheel as it was before. The only thing different now is that the shortcut listing appears while zooming, zooming is not as smooth, and I have no mouse cursor. How can I get the cursor to remain visible while zoomed in?

    Read the article

  • Dealing w/ Sqlite Join results in a cursor

    - by Bill
    I have a one-many relationship in my local Sqlite db. Pretty basic stuff. When I do my left outer join I get back results that look like this: the resulting cursor has multiple rows that look like this: A1.id | A1.column1 | A1.column2 | B1.a_id_fk | B1.column1 | B1.column2 A1.id | A1.column1 | A1.column2 | B2.a_id_fk | B2.column1 | B2.column2 and so on... Is there a standard practice or method of dealing with results like this ? Clearly there is only A1, but it has many B-n relationships. I am coming close to using multiple queries instead of the "relational db way". Hopefully I am just not aware of the better way to do things. I intend to expose this query via a content provider and I would hate for all of the consumers to have to write the same aggregation logic.

    Read the article

  • What's the location of a personal 'gtkrc' file in Ubuntu 12.04?

    - by Kevin Perez
    Good day everyone! I am currently writting a software that makes easy to change default cursor theme with a few clicks. At this point it works well, but applications like Firefox or Lazarus IDE remain with the DMZ-White cursor, everything else is ok. I noticed that when I change the default cursor using my software, and later change the 'personalized' cursor theme using Ubuntu Tweak, it does the job, and the new theme is now applied everywhere. So, what file is need to modify in order to change 'personal' cursor theme? If my software can do this, that would be great! I found that 'gtkrc' is a file where settings of GTK+ are stored. I searched in my home folder but I can't find yet. Can you help me with this, noble people of Ubuntu? :)

    Read the article

  • Setting the Cursor Position in a Win32 Console Application

    - by Jim Fell
    How can I set the cursor position in a Win32 Console application? Preferably, I would like to avoid making a handle and using the Windows Console Functions. (I spent all morning running down that dark alley; it creates more problems than it solves.) I seem to recall doing this relatively simply when I was in college using stdio, but I can't find any examples of how to do it now. Any thoughts or suggestions would be greatly appreciated. Thanks.

    Read the article

  • How use the google maps hand cursor in Python?

    - by aF
    Hello, I want to use the google maps hand cursor in Python but I don't know how to do it. I've downloaded the cursor but I only get to use the hand open, I also have a event that "closes" the hand when clicked but I don't know how can I change the style cursor on it. I say this because the google maps hand cursor has two style (the open and the closed hand). If you don't know how to use the other style you can also tell me how can I create another cursor where the close hand is the default style. If I have that, I only change the cursor and it's done. Thanks in advance :)

    Read the article

  • XNA 2D Board game - trouble with the cursor

    - by Adorjan
    I just have started making a simple 2D board game using XNA, but I got stuck at the movement of the cursor. This is my problem: I have a 10x10 table on with I should use a cursor to navigate. I simply made that table with the spriteBatch.Draw() function because I couldn't do it on another way. So here is what I did with the cursor: public override void LoadContent() { ... mutato.Position = new Vector2(X, Y); //X=103, Y=107; mutato.Sebesseg = 45; ... mutato.Initialize(content.Load<Texture2D>("cursor"),mutato.Position,mutato.Sebesseg); ... } public override void HandleInput(InputState input) { if (input == null) throw new ArgumentNullException("input"); // Look up inputs for the active player profile. int playerIndex = (int)ControllingPlayer.Value; KeyboardState keyboardState = input.CurrentKeyboardStates[playerIndex]; if (input.IsPauseGame(ControllingPlayer) || gamePadDisconnected) { ScreenManager.AddScreen(new PauseMenuScreen(), ControllingPlayer); } else { // Otherwise move the player position. if (keyboardState.IsKeyDown(Keys.Down)) { Y = (int)mutato.Position.Y + mutato.Move; } if (keyboardState.IsKeyDown(Keys.Up)) { Y = (int)mutato.Position.Y - mutato.Move; } if (keyboardState.IsKeyDown(Keys.Left)) { X = (int)mutato.Position.X - mutato.Move; } if (keyboardState.IsKeyDown(Keys.Right)) { X = (int)mutato.Position.X + mutato.Move; } } } public override void Draw(GameTime gameTime) { mutato.Draw(spriteBatch); } Here's the cursor's (mutato) class: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace Battleship.Components { class Cursor { public Texture2D Cursortexture; public Vector2 Position; public int Move; public void Initialize(Texture2D texture, Vector2 position,int move) { Cursortexture = texture; Position = position; Move = move; } public void Update() { } public void Draw(SpriteBatch spriteBatch) { spriteBatch.Draw(Cursortexture, Position, Color.White); } } } And here is a part of the InputState class where I think I should change something: public bool IsNewKeyPress(Keys key, PlayerIndex? controllingPlayer, out PlayerIndex playerIndex) { if (controllingPlayer.HasValue) { // Read input from the specified player. playerIndex = controllingPlayer.Value; int i = (int)playerIndex; return (CurrentKeyboardStates[i].IsKeyDown(key) && LastKeyboardStates[i].IsKeyUp(key)); } } If I leave the movement operation like this it doesn't have any sense: X = (int)mutato.Position.X - mutato.Move; However if I modify it to this: X = (int)mutato.Position.X--; it moves smoothly. Instead of this I need to move the cursor by fields (45 pixels), but I don't have any idea how to manage it.

    Read the article

  • Just installed Ubuntu 12.04. When booting, all I get is a black screen with cursor

    - by user66378
    Installation appears to go fine. After rebooting, I get my motherboard loading screens, but when it comes time for Ubuntu to boot, I just get a black screen with a blinking white underscore in the top-left - same as I got when waiting for the install CD to load, except it lasts forever. The only keypress it seems to recognize is ctrl+alt+del, which reboots. Letters don't register, function keys w/ or w/o modifiers do nothing. I've installed Ubuntu 12.04 twice and got the same error. The first time, I installed it as the only OS, and had it take up the whole disk. The second time, I installed Windows 7 first, then Ubuntu by specifying custom partitions. After this install, it would boot straight to Windows without showing grub. I used EasyBCD to add the Ubuntu installation to grub, and this got grub to show, and let me select it, but it led back to the same error described up top. I've had Linux Mint 11 and 12 installed on this PC, but was unable to get previous versions of Ubuntu to install (always had errors while installing, not after). Hardware: Intel Core i7-2600K Sandy Bridge 3.4GHz (3.8GHz Turbo Boost) LGA 1155 ASUS SABERTOOTH P67 (REV 3.0) LGA 1155 Intel P67 SATA 6Gb/s USB 3.0 ATX Intel Motherboard EVGA 01G-P3-1371-TR GeForce GTX 460 (Fermi) CORSAIR Vengeance 16GB (4 x 4GB) 240-Pin DDR3 SDRAM DDR3 1600 (PC3 12800) Western Digital RE4 WD5003ABYX 500GB 7200 RPM SATA 3.0Gb/s 3.5" Internal Hard Drive

    Read the article

  • Getting data from the next row in Oracle cursor

    - by Chaotic_one
    Hi, I'm building nested tree and I need to get data for the next row in cursor, using Oracle. And I still need current row, so looping forward is not a solution. Example: OPEN emp_cv FOR sql_stmt; LOOP FETCH emp_cv INTO v_rcod,v_rname,v_level; EXIT WHEN emp_cv%NOTFOUND; /*here lies the code for getting v_next_level*/ if v_next_level > v_level then /*code here*/ elsif v_next_level < v_level then /*code here*/ else /*code here*/ end if; END LOOP; CLOSE emp_cv;

    Read the article

  • Why doesn't my cursor change to an Hourglass in my FindDialog in Delphi?

    - by lkessler
    I am simply opening my FindDialog with: FindDialog.Execute; In my FindDialog.OnFind event, I want to change the cursor to an hourglass for searches through large files, which may take a few seconds. So in the OnFind event I do this: Screen.Cursor := crHourglass; (code that searches for the text and displays it) ... Screen.Cursor := crDefault; What happens is while searching for the text, the cursor properly changes to the hourglass (or rotating circle in Vista) and then back to the pointer when the search is completed. However, this only happens on the main form. It does not happen on the FindDialog itself. The default cursor remains on the FindDialog during the search. While the search is happening if I move the cursor over the FindDialog it changes to the default, and if I move it off and over the main form it becomes the hourglass. This does not seem like what is supposed to happen. Am I doing something wrong or does something special need to be done to get the cursor to be the hourglass on all forms? For reference, I'm using Delphi 2009.

    Read the article

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