Search Results

Search found 1599 results on 64 pages for 'pressed'.

Page 43/64 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • Connecting two DialogBoxes in GWT

    - by Apophenia Overload
    In my GWT project, I'm trying to get it so two DialogBoxes can pass information between each other. One of them holds a MapWidget, and when a button is pressed in the other DialogBox, the position information is received from that other DialogBox's MapWidget. Does anyone have any tips for how I should coordinate between having two different DialogBoxes show up? Should I wrap the code for the two in a Composite? Furthermore, is there an example anywhere of dealing with two DialogBoxes at once in GWT? For example, if I click outside of the two boxes, both should be dismissed. I'm wondering if there's a way to keep both of them in focus at once, so I can switch between the two without causing either to disappear.

    Read the article

  • calling function in radiobutton group

    - by vijisai
    thank you very much. with your help, i am now able to call the function for each radio button. however, i get a error message Reference to non-existent field 'ics_si' ics_si is my function, which has the following code, i do not know where i am making a mistake i have created the edit box for user to input the values for bore and stroke. and vdisp is calculated and the result is displayed in the third edit box. function ics_si_Callback(hObject, eventdata, handles) b = str2double(get(handles.bore,'String')); s = str2double(get(handles.stroke,'String')); vdisp = (pi * b * b * s*10^(-3))/4; set(handles.vdisp,'String',vdisp); this code must be called when i press the first or second radio button. i.e. when the radio button is pressed, it should call the function ics_si, calculate it and display the result. how to get this.

    Read the article

  • How to retrieve the location of a control on the view?

    - by amok
    I have a button on a view, I want to add another button next to it when the first button is touched. Therefore I need it's top left corner to do the math. Here's what is puzzling me greatly: // this code is executed when the button is pressed NSLog(@"X:%f",moreButton.frame.origin.x); that returns on the first and second click the followings: 2010-04-24 22:58:25.883 iPad PopOver[8095:40b] X:-1.999002 2010-04-24 22:58:25.884 iPad PopOver[8095:40b] Y:0.000000 why and how can I get the x,y of an existing button on the view? (button created via IB) Thanks! mE ps: I have looked at similar posts and my code looks fine but I keep getting zeros (it's an ipad app if matters in any way)

    Read the article

  • (VB or C#) Run app in system tray and listen to keyboard input even when the app is not in focus

    - by Avinash Sonee
    I want to make an app which on loading sits in the system tray and even after I open another program (say notepad or vlc or anything) i.e. even when the app is not in focus and if I press "G" on my keyboard, the tray icon should show a tool tip - "key G is pressed". I have tried several codes but nothing works when the app goes out of focus. I can use Register Hot Key (http://msdn.microsoft.com/en-us/library/ms646309(VS.85).aspx) but it needs a modifier also (like Ctrl or Alt etc. along with my key G). So, is there any way I can achieve this? something which many tray icons do like antivirus apps, etc. and I do not want to use AutoHotkey application. I want to build one but need some help. Thanks!

    Read the article

  • Simple iPhone tally method question

    - by Rob
    Just trying to create a simple method that counts up 1 on the tally when the button is pressed. My knowledge is extremely limited and I am pretty sure that my problem is somewhere in the method implementation: -(IBAction) updateTally:(id) sender { NSString *text; int total = 0; total = total + 1; text=[[NSString alloc] initWithFormat: @"%i", total]; lblTally.text = text; } I have done the necessary interface declarations for the lblTally UILabel and the updateTally method. I suspect that there is some sort of an NSString/int/%i/%@ mixup that I am making but I'm not sure how to fix it. When I run the program as it currently is it displays a 0 in the lblTally label field on the iphone. When I press the button it then displays a 1 in that field. However, if I continue to press the button - nothing happens.

    Read the article

  • How do I mimic Windows Explorer multi-select/drag-n-drop behavior in a DataGridView?

    - by bsh152s
    I'm trying to mimic the way Windows Explorer handles multiple selection. In a default DataGridView, you can select multiple items using Ctrl-click. But if you release the Ctrl key and then try and drag/drop the selected items, it clears the selected items and only selects the "hit" row. I found the following solution somewhere online. protected override OnMouseDown(MouseEventArgs e) { int hitRowIndex = HitTest(e.X, e.Y).RowIndex; if(!SelectedRows.Contains(Rows[hitRowIndex])) { base.OnMouseDown(); } } However, this causes other side effects. With the CTRL key pressed and mousing down on a selected item, the item remains selected. This makes sense because the mousedown event is bypassed if the row clicked on is selected. From looking at the behavior of Windows Explorer, it looks like the deselection of an item with the CTRL key held is not handled until the MouseUp event. Has anyone tried to do this?

    Read the article

  • How to count toggled buttons in jqueryui after a click event.

    - by SystemicPlural
    I need to count how many buttons are toggled using the jqueryui checkbox button option - .buttonset(). This needs to happen when a button is toggled. I added a unique class to the labels before applying the button set and have set a click event on it. It fires fine, however it is firing before the jqueryui has processed the click so the result is out of date. How do I apply the click event after jqueryui has done its job? $(".button-set").click(function(){ var selected = $("#offer_list_4 label[aria-pressed=true]").length; // out of date });

    Read the article

  • Button to add value to array and then compare result with another array on IPhone.

    - by slickplaid
    I have ten buttons that each correspond to a different number. I'm looking to record the order that these buttons are pressed and enter them into an array and then compare it to another array that is static in the app. The check should be done on the Nth button press, where N equals the number of items in the other, static array. How do I A) have a button press add a value to an array B) stop after Nth button press equal to amount of numbers in the array I'm checking against and C) compare this array to the other array?

    Read the article

  • Automatic VisualState Manager in Silverlight

    - by Matt
    If you create a simple button and then choose Edit Template - Edit a Copy, Blend will automatically generate a style area, along with all the button states (MouseEnter, MouseLeave, Pressed, etc). No where in the code behind or auto generated style area does it say that on a "MouseOver" event, change the state to "MouseOver", but it still manages to work! Is the only way to change a button's state have to be done the code behind using the VisualStateManager.GoToState method, or can you change it much like CSS does (a:hover) using the VisualStateManager? From my experience, setting just doesn't seem to do the trick.

    Read the article

  • An image cropper: How to prevent the default drag n' drop action?

    - by David Gore
    I am developing an image cropper and would like to ask you the following question: In order to prevent the default drag n' drop action when you press the left button on an image and keeping it pressed try to move the mouse, wouldn't it be cross-browser if to just use the picture as a background to a div box? Just like so: <div id="theDiv" style="background:url(pic.png) no-repeat;"></div> How do you think? Is it acceptable? Not too ugly? Or should be done with JS?

    Read the article

  • How can keep track of the index path of a button in a tableview cell?

    - by Jake
    I have a table view where each cell has a button accessory view. The table is managed by a fatchedresults controller and is frequently reordered. I want to be able to press a button and be able to obtain the index path of the pressed button's tableviewcell. I've been trying to get this working for days by storing the row of the button in it's tag, but when the table get's reordered the row becomes incorrect and I keep failing at reordering the tags correctly when a change is made. Any new ideas on how to keep track of the button's cell's index path? Thanks so much for any help.

    Read the article

  • Android: How to set the contents of a Edit text from a Button click?

    - by primal
    Hi, I am a rookie to android. I am thinking of implementing a simple calculator in android to get a hold of the basics in android. I want to display a keypad with numbers and mathematical operations and when the user presses the keys the corresponding number is displayed in edit text. I tried using gettext() and updating the contents of edit text but it shows just the contents of pressed button. Also how do I read the contents of button so as to do mathematical operations in code? Any help would be much appreciated. regards, Primal

    Read the article

  • javascript welcoming msgbox problem

    - by shouq
    hey... i'm doing my html and javascript class project and i want to have a msgbox welcoming the visitor asking for his name and then a welcoming msgbox shows up saying "hello (the name added)" i know how to do that but my only problem is that if i pressed back and went to the homepage of my website again, the msg will show up again asking for my name is there anyway to prevent this from happening? seriously don't want the visitor to wite his name each time he goes to the home page please help this is the code i'm using: <script> response = window.prompt("Welcome!","Please enter your name"); window.alert("hello " + response); </script> please help

    Read the article

  • adding admob widget

    - by zaid
    i cant seem to figure out how to add the admob widget into my application. i want to add the widget to a linearlayout that is the child of a relative layout. the linerlayout was created just for the ad. and have it update/refresh the ad each time a button is pressed. i have already imported the JAR,edited my manifest to include the permissions and publisher id. but i cant seem to exactly figure out how to add integrate the admob code.

    Read the article

  • Java: Friendlier way to get an instance of FontMetrics

    - by Martijn Courteaux
    Hi people, Is there a friendlier way to get an instance of FontMetrics than FontMetrics fm = Graphics.getFontMetrics(Font); I hate this way because of the following example: If you want to create in a game a menu and you want all the menuitems in the center of the screen you need fontmetrics. But, mostly, menuitems are clickable. So I create an array of Rectangles and all the rectangles fits around the items, so when the mouse is pressed, I can simply use for (int i = 0; i < rects.length; i++) if (rects[i].contains(mouseX, mouseY)) { ... } But to create the rects I also need FontMetrics for their coordinates. So this mean that I have to construct all my rectangles in the paint-method of my menu. So I want a way to get the FontMetrics so I can construct the Rectangles in a method called by the constructor. Hope you understand. Thanks in advance.

    Read the article

  • Can't move li elements from one unorderted list to another

    - by Roland
    I have two un-ordered list <ul id="#list1"> <li>one</li> <li>two</li> </ul> <ul id="#list2"></ul> and two buttons <input id="add" name="yt1" type="button" value="<<" /><br /> <input id="remove" name="yt2" type="button" value=">>" /> If the button with the id add is pressed all elements from #list1 should be move to #list2. How do I move elements from one list to another using JQuery I though of something like the below, but not sure how to do the actual moving $("#add").click(function(){ $("#list1 li").each(function(){ //Do not know what to put in here } })

    Read the article

  • aspx page gives viewstate error

    - by Priya10
    Hi, I have a simple aspx page with one grid view. When deployed on server, and accessed through that machine, it works fine. However, when connected through load balancer, we get this error ( when click on any button). The page however refreshes when pressed F5. Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. Any idea what is happening here???

    Read the article

  • Android service puts multiple instances of an activity in the history

    - by HenryAdamsJr
    I'm making a music player. When you press play, it loads a notification into the OnGoing section. When you go anywhere else in the system, I want the music to keep playing. All of this is fine. The problem is that when I relaunch my activity from the Notification, it adds a task to the history stack each time, so if I hit back, I have to see the instance of Activity B from where I pressed play, and from every time I clicked on the notification to go back to Activity B. I want the instance of Activity B that I launch from the notification (via the service) to be the only copy of that Activity in the history. I've been playing around with various Intent flags and Activity attributes in the manifest, but I haven't found the proper combination.

    Read the article

  • as3 dynamic button name capturing problem

    - by user16458
    i am using this code below to dynamically capture the name of the button pressed and then playing the related balloon movie clip animation. stage.addEventListener(MouseEvent.CLICK, player); function player(evt:MouseEvent){ var nameofballoon = evt.target.name; nameofballoon =nameofballoon.substring(nameofballoon.length-1,nameofballoon.length); var movie = "balloon"+nameofballoon; trace(movie); movie.gotoAndPlay("burst"); } i'm getting this error even though the name of the clip capture by the event is correct TypeError: Error #1006: value is not a function. at Balloons2_fla::MainTimeline/player() any thoughts ? what wrong with this code?

    Read the article

  • How can I close my software in a save way?

    - by Roman
    Up to now I used my application as a stand alone product. So, when user pressed "Stop" button I called System.exit(0); and it was fine. Now my application will be called (in a programmatic way) from another program. So, I afraid that System.exit(0); will kill not only my process but also the external software which started my program. So, what is the correct way to shutdown my application if a corresponding request from an external software is received? My application is an GUI application. So, I want to close the window but I also want to close all processes performed by my program. ADDED: To be more specific, I want to close all threads started by my program. My program does not start any OS process or any other program.

    Read the article

  • Refresh the Parent form of "Call_form" after Child form is closed in Oracle 10g

    - by DotNetDan
    What I need is: what trigger to use and where to put it. I will give you an example of what I am doing. I have a Contract form that is fully editable except the contract financial areas, which is read only. I want the user to press a button called, “change rates” and that will have a trigger “When-Button-Pressed” and call_form(UpdateFinancials);. Now, in this screen, I have the user change the financial information such as increase the contract from 50k to 100k. Then the user saves and exits. This will then close the child form "UpdateFinancials" and show the parent form "ContractForm". The problem is, it still has all the old information on it. I need the information in the form to refresh when it gets back from the child form of the Call_Form function.

    Read the article

  • updating a shape in scene with a for loop using javafx

    - by Susanta
    Following is a code fragment. I am updating a rectangle using a for loop when a button is pressed. This is a model for my ultimate intention of showing visualization of data model as it changes large number of times inside a for loop. It works but I see only one change. Now since I am changing the width randomly I should see large number of changes. It seems I am making a wrong assumption on something basic. The code goes below: 7 var rec: Rectangle = Rectangle { 8 x: 10, y: 10 9 width: 140, height: 90 10 fill: Color.BLACK 11 } 12 13 Stage { 14 title: "MyApp" 15 scene: Scene { 16 width: 200 17 height: 200 18 content: [ 19 rec, 20 Button { 21 text: "Button" 22 action: function () { 23 for (i in [1..999]) { 24 rec.width = 25 + java.lang.Math.random()*50; 25 } 26 } 27 } 28 ] 29 } 30 }

    Read the article

  • Why isn't this simple program working?

    - by user1445478
    I'm writing a very basic program that aims for the text view to display the phrase "Hello" after a button is pressed on the screen. However, I can't get this program to work; every time I run it, it says that the application has stopped unexpectedly. This is the program I wrote: public class EtudeActivityActivity extends Activity{ TextView tvResponse; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final TextView tvResponse = (TextView) findViewById (R.id.tvResponse); } public void updateTV(View v) { tvResponse.setText("Hello"); } } Also, I inserted an android:onClick = "updateTV" into my main.xml file for the button. Thanks for any help!

    Read the article

  • Clear all currently defined vim macros

    - by Simon Walker
    Hi everyone I have a vim macro that I keep mistyping, usually when I'm trying to save something so I do it quickly and I can't work out what keys I pressed. It is annoying as it pastes some irrelevant bash code into my file so I have to undo the erroneous pasting which also undos the last thing I typed that I do want. I was looking for a way to either list the currently defined macros (so I can redefine the offending one), or a way to clear out them completely. I only use macros in the very short term so I don't mind losing them all. Cheers

    Read the article

  • Application crashes when popViewControllerAnimated is called while scrolling

    - by Aldrich
    In one screen I have a custom toolbar with a "close" button in it, and a UIScrollView. In the screen that preceded this one I had pushed the current screen into the navigation stack. I had also disabled the navigation toolbar for a larger display area and so the close button would instead be used to call: - (void)doClose { [self.navigationController popViewControllerAnimated:YES]; } Now here's the problem: the application crashes when the close button is pressed, while the UIScrollView is moving. Here's the debugger stack trace: 0 __forwarding__ 1 __forwarding_prep_0___ 2 -[UIToolbarButton setHighlighted:] 3 -[UIControl(Static) _unhighlight] 4 __NSFireDelayedPerform ... and I do have the following line in the debugger console: *** -[CALayer setOpacity:]: message sent to deallocated instance 0x718d250 (sometimes setOpacity would be setNeedsDisplay or something related) There won't be any crashes while the scrollview is at rest. What is happening?

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >