Search Results

Search found 16738 results on 670 pages for 'lwuit button'.

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

  • Disable button after submit

    - by Chris Philpotts
    I'm trying to disable a button when a user submits a payment form and the code to post the form is causing a double post in firefox. This problem does not occur when the code is removed, and does not occur in any browser other than firefox. Any idea how to prevent the double post here? System.Text.StringBuilder sb = new StringBuilder(); sb.Append("if (typeof(Page_ClientValidate) == 'function') { "); sb.Append("if (Page_ClientValidate() == false) { return false; }} "); sb.Append("this.value = 'Please wait...';"); sb.Append("this.disabled = true;"); sb.Append(Page.GetPostBackEventReference(btnSubmit )); sb.Append(";"); btnSubmit.Attributes.Add("onclick", sb.ToString()); it's the sb.Append(Page.GetPostBackEventReference(btnSubmit )) line that's causing the issue Thanks EDIT: Here's the c# of the button: <asp:Button ID="cmdSubmit" runat="server" Text="Submit" /> here's the html This code posts twice (and disables the submit button and verifies input): <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" onclick="if (typeof(Page_ClientValidate) == 'function') { if (Page_ClientValidate() == false) { return false; }} this.value = 'Please wait...';this.disabled = true;document.getElementById('ctl00_MainContent_cmdBack').disabled = true;__doPostBack('ctl00$MainContent$cmdSubmit','');" id="ctl00_MainContent_cmdSubmit" /> This code posts twice (but doesn’t disable the submit button): <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" onclick="__doPostBack('ctl00$MainContent$cmdSubmit','');" id="ctl00_MainContent_cmdSubmit" /> This code posts once (but doesn’t verify the user input and doesn’t disable the submit button): <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" id="ctl00_MainContent_cmdSubmit" /> This code posts once (but doesn’t disable submit button): <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$MainContent$cmdSubmit&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_MainContent_cmdSubmit" /> This code doesn’t post at all: <input type="submit" name="ctl00$MainContent$cmdSubmit" value="Submit" onclick="this.disabled = true;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$MainContent$cmdSubmit&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="ctl00_MainContent_cmdSubmit" /> Obviously it’s the disabling of the submit button that’s posing the problem. Do you have any ideas how we can disable the submit to avoid multiple clicking?

    Read the article

  • jQuery Dynamic Button Click Handler

    - by Neb
    I have a code the change the html of a div to make a button. When I make a click handler for the dynamic button, nothing happens $('#signinup').html("<button id=\"login_submit\">Sign In</button>"); And the handler: $('#login_submit').click(function() { alert("Works!"); });

    Read the article

  • Swap button for image (Jquery)

    - by Skoder
    Hi I have a button and when it's clicked, I want to replace the button with an image. How can I do this in JQuery? Is it possible to replace the background of the image as well? The button itself is within a large div, and I don't want to add another div around the button because it messes up a previous layout. Thanks

    Read the article

  • styling a form button

    - by Ayrton
    Hi I would like to style a form button (input or button tag) with 2 background images to create a stretchable button (relative to the text-length). The form button should also have a hovered state and it should be cross browser (at least IE7 & +) would need to support it. I know how to obtain the effect with just css with an tag = test If anyone could help me a little bit, I would be pleased yours truthfully

    Read the article

  • ASP.NET button_click not firing, after browser back button

    - by the berserker
    I have a ASPX Page that contains several user controls, which are loaded dynamically after user interaction. On one of ascx I have a hidden button that is being clicked on some user actions (via button.click()), which works fine on 1st page load. But after the form is being submitted once, the other ascx is loaded. There if user clicks the back button and resubmits the 1st form (again via button.click()), button_clicked event on server does not fire again. Any thought?

    Read the article

  • Add button to a layout programmatically

    - by mmmbaileys
    I'm having trouble adding a button to a layout that I've created in XML. Here's what I want to achieve: //some class else { startActivity(new Intent(StatisticsScreen.this, ScreenTemperature.class)); } //// //ScreenTemperatureClass @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //this is where I call another class that //displays a nice graph setContentView(new GraphTemperature(getApplicationContext())); } I want to add a Button to this new screen so that it'll appear below the graph. I've tried creating a LinearLayout view, then create a Button and add it to this view but I just get NullPointerExceptions.. Any help would be appreciated. Thanks EDIT#1 Here's what I've tried using that created a NullPointerException and 'force close': Button buybutton; LinearLayout layout; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(new GraphTemperature(getApplicationContext())); layout = (LinearLayout) findViewById(R.id.statsviewlayout); Button buyButton = new Button(this); buyButton.setText(R.string.button_back); buyButton.setLayoutParams(new LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); layout.addView(buyButton); } And here's the logcat error: ERROR/AndroidRuntime(293): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.weatherapp/com.weatherapp.ScreenTemperature}: java.lang.NullPointerException ERROR/AndroidRuntime(293): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) ERROR/AndroidRuntime(293): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) ERROR/AndroidRuntime(293): at android.app.ActivityThread.access$2300(ActivityThread.java:125) ERROR/AndroidRuntime(293): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) theres abviously more lines to do with this error in logcat, not sure if you want it? EDIT#2 So i tried bhups method: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GraphTemperature GT = new GraphTemperature(getApplicationContext()); layout = (LinearLayout) findViewById(R.id.statsviewlayout); Button buyButton = new Button(this); buyButton.setText(R.string.button_back); buyButton.setLayoutParams(new LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); layout.addView(GT); // line 27 layout.addView(buyButton); setContentView(layout); } This method produced the same logcat error as above, NullPointerException, indicating it was something to do with line no. 27 which is the layout.addView line of code. Any ideas? Thanks again

    Read the article

  • Middle Mouse Button does not work in XFCE / Arch Linux

    - by Alp
    I have the XFCE desktop manager installed on my Arch Linux system. With E17 (Enlightenment desktop manager) i had no problems with my mouse: all buttons worked correctly out of the box. But in XFCE my middle mouse button does not fire an event at all (no output with xev). Evdev seems to identify my mouse correctly (Razer Deathadder) because it echoes its name in the xorg logs. I have no idea what could cause this and how to debug the problem. I start both e17 and xfce with startx. Here is my ~/.xinitrc: exec startxfce4 --with-ck-launch #exec enlightenment-start

    Read the article

  • Right-button drag-drop function in Gnome

    - by HorusKol
    While I don't really miss the annoyances that go with working on Windows, one thing I do wish I had in Gnome is the ability to hold the right-mouse button down on a file and drag it to get the context menu asking if I want to move or copy the file. I realise the default tries to be sensible (like in Windows - defaults to move if on the same volume, or copy if on different) and that it can be overridden with <ctrl> or <shift> - but i'm still used to the right-mouse drag option and keep getting frustrated when it doesn't work...

    Read the article

  • dojo.connect won't connect 'onclick' with button

    - by Daniel
    I'm running into a problem using dojo.connect() to connect an 'onclick' event with this button: <button dojoType="dijit.form.Button" widgetId="inbox_button" id="inbox_button">Inbox</button> and the code making the connection is: var inbox_button=dojo.byId("inbox_button"); dojo.connect(inbox_button,'onclick',function(){ var container=dijit.byId("center"); container.addChild(new dijit.layout.ContentPane({region: "left", content: "...", style: "width: 100px;"})) }); However, instead of executing the function when the button is clicked, ANY onclick event triggers the function, and I end up with a lot of children containers. Even though I'm pretty certain the .connect() function should be available as part of dojo's base functionality, I've 'required' it explicitly: dojo.require("dojo._base.connect"); Any ideas as to why this might be happening?

    Read the article

  • image on top of button android

    - by N-AccessDev
    Is it possible to add an image(view) on top of a button (which as a background image)? I'm porting an iOS app to Android and it wasn't a problem on iOS, but I'm wondering if it is the right approach on Android because of layouts. Edit : To clarify, check this screen shot : http://a4.mzstatic.com/us/r1000/062/Purple/v4/7c/4b/cd/7c4bcd53-ba55-94d7-a26c-ce1bfe040003/mza_2736801523527387264.320x480-75.jpg I need to do the bottom left button "carte" (card in french) I need : a button with a background image an image displayed on top of the button which is loaded from internet (a card , there is a lot of different and news cards are added daily, in the screnshot it s "MIDI PASS" ) a text localised on the button , so I cant use Imagebutton class.

    Read the article

  • Event OnClick for a button in a custom notification

    - by Simone
    I have a custom notification with a button. To set the notification and use the event OnClick on my button I've used this code: //Notification and intent of the notification Notification notification = new Notification(R.drawable.stat_notify_missed_call, "Custom Notification", System.currentTimeMillis()); Intent mainIntent = new Intent(getBaseContext(), NotificationActivity.class); PendingIntent pendingMainIntent = PendingIntent.getActivity(getBaseContext(), 0, mainIntent , 0); notification.contentIntent = pendingMainIntent; //Remoteview and intent for my button RemoteViews notificationView = new RemoteViews(getBaseContext().getPackageName(), R.layout.remote_view_layout); Intent activityIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:190")); PendingIntent pendingLaunchIntent = PendingIntent.getActivity(getBaseContext(), 0, activityIntent, PendingIntent.FLAG_UPDATE_CURRENT); notificationView.setOnClickPendingIntent(R.id.button1, pendingLaunchIntent); notification.contentView = notificationView; notificationManager.notify(CUSTOM_NOTIFICATION_ID, notification); With this code I've a custom notification with my custom layout...but I can't click the button! every time I try to click the button I click the entire notification and so the script launch the "mainIntent" instead of "activityIntent". I have read in internet that this code doesn't work on all terminals. I have tried it on the emulator and on an HTC Magic but I have always the same problem: I can't click the button! My code is right? someone can help me? Thanks, Simone

    Read the article

  • Button text loses allignment after clicking

    - by breathe0
    Strange things happen. I have a 4x4 button table layout, which is the following: <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_below="@+id/cerca"> <TableRow android:layout_width = "fill_parent" android:layout_height = "wrap_content"> <Button android:id = "@+id/btn1" android:layout_width = "wrap_content" android:layout_height = "wrap_content" android:layout_weight="1" android:text = "Scarica POI da server" android:onClick="downloadFromServer" /> <Button android:id = "@+id/btn2" android:layout_width = "wrap_content" android:layout_height = "wrap_content" android:layout_weight="1" android:text = "Aggiungi POI" android:onClick="goCreatePOI" /> </TableRow> <TableRow android:layout_width = "fill_parent" android:layout_height = "wrap_content"> <Button android:id = "@+id/btn3" android:layout_width = "wrap_content" android:layout_height = "wrap_content" android:layout_weight="1" android:text = "Rimuovi i POI del server" android:onClick="removeServerPOI" /> <Button android:id = "@+id/btn4" android:layout_width = "wrap_content" android:layout_height = "wrap_content" android:layout_weight="1" android:text = "Rimuovi i POI personali" android:onClick="removePersonalPOI" /> </TableRow> </TableLayout> This table layout is nested inside a relative layout, which is nested in a scrollview. Now, whenever i click on one of them, everytime the text inside the button change allignment: if before clicking was centered and displayed on two lines, after the click it loses its alignment and is displayed only in one row (cutting off some part of the text). Am I doing something wrong, or maybe it's a bug?

    Read the article

  • Background custom button animation using WPF

    - by ajtp
    Hi, I am using Resources dictionaries to customize my controls and apply them as themes to my WPF application so I have implemented one for the button control. A code snippet for my custom Button.xaml is (its namespace is MyWPFApp.Themes): <ResourceDictionary ...> ... <LinearGradientBrush x:Key="NormalBackground" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="sc#1.000000, 0.250141, 0.333404, 0.884413" Offset="0"/> <GradientStop Color="#ccffffff" Offset="1"/> </LinearGradientBrush> <LinearGradientBrush x:Key="OverBackground" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#da5e69" Offset="0"/> <GradientStop Color="#d12e27" Offset="1"/> </LinearGradientBrush> <LinearGradientBrush x:Key="ClickBackground" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#d22828" Offset="1"/> <GradientStop Color="#b00000" Offset="0"/> </LinearGradientBrush> ... <Style TargetType="{x:Type Button}"> ... <Setter Property="Background" Value="{StaticResource NormalBackground}"/> ... </Style> </ResourceDictionary> and I apply it by doing the following from my main Application.xaml: <Application ...> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="Themes/Button.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application> What I try to do is to change background color, for example, from White to Lime for 6 seconds by doing this from one of my pages, MyPage1.xaml, using StoryBoard: <Page x:Class="MyWPFApp.Pages.MyPage1" ...> <Page.Resources> ... <Storyboard x:Key="sbBtnResetHC" Storyboard.TargetName="BtnResetHC" Storyboard.TargetProperty="(Background). (SolidColorBrush.Color)"> <ColorAnimation From="Pink" To="Green" By="Blue" Duration="0:0:6" RepeatBehavior="3x" AutoReverse="True" /> </Storyboard> ... </Page.Resources> ... <Button x:Name="BtnResetHC" Click="BtnResetHC_Click" Width="90" Visibility="Collapsed" /> ... </Page> and from code behind MyPage1.xaml.cs I start animation by doing this: Storyboard sb = (Storyboard)FindResource("sbBtnResetHC"); sb.Begin(); when the button is visible, but it doesn't work for me. Any ideas what's wrong? Maybe another possibility, as I want the animation starts on button visible is to do a trigger for the button over Visibility property, Is it a better solution? Thanks a lot!

    Read the article

  • Android ListView delete row button - focus issue

    - by Max Gontar
    Hi! I have an activity with ListView and buttons below: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <ListView android:id="@+id/lvLamps" android:layout_width="fill_parent" android:layout_height="fill_parent" android:listSelector="@null" android:choiceMode="none" android:scrollbarStyle="insideInset" android:layout_weight="1.0" /> <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_weight="0.0"> <Button android:id="@+id/btnAdd" android:background="@null" android:drawableLeft="@drawable/btn_upgrade" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableRight="@drawable/lbl_upgrade" android:textSize="0pt" android:text="" android:layout_alignParentLeft="true" android:padding="20px" /> <Button android:id="@+id/btnNext" android:background="@null" android:drawableRight="@drawable/next_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableLeft="@drawable/lbl_next" android:textSize="0pt" android:text="" android:layout_alignParentRight="true" android:padding="20px" android:visibility="gone" /> <ImageButton android:id="@+id/btnListExit" android:background="@null" android:src="@drawable/btn_x" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:padding="20px" /> </RelativeLayout> </LinearLayout> ListView row contains delete button: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:focusable="true"> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:focusable="true"> <ImageButton android:id="@+id/btnRowDelete" android:src="@drawable/btn_x" android:background="@null" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:padding="4px" android:focusable="true" android:focusableInTouchMode="true"/> <TextView android:id="@+id/txtLampRowFrom" android:text="123" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="6pt" android:layout_toRightOf="@id/btnRowDelete" android:focusable="false" android:textColor="@color/textColor"/> <TextView android:id="@+id/txtLampRowTo" android:text="123" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="6pt" android:layout_toRightOf="@id/btnRowDelete" android:layout_alignParentBottom="true" android:focusable="false" android:textColor="@color/textColor"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/arrow_upgrade_to" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:focusable="false"/> </RelativeLayout> </LinearLayout> In Adapter, Button onClickListener is set, also there are dummies to make list non-selectable: // disabling list items select public boolean areAllItemsEnabled() { return false; } public boolean isEnabled(int position) { return false; } What I want is: always show buttons in the bottom of screen after list (no matter how long it is, there should be scroll if it's too long) ListView should not be selectable, I don't want row selection row delete button should be selectable (focusable) with touch and with trackball And everything works except I can't focus row delete button with trackball (although it's working with touch). Can you help me? Thanks!

    Read the article

  • Android : Cannot cast from View to Button

    - by Mick
    I just started working with the Android, but seem to have come across a problem that I simply can't find the answer to. I get the error "Cannot cast from View to Button" on this line : Button myButton = (Button)findViewById(R.id.my_button); I've tried many different things to get it going, and I've searched for the answer, but for some reason it just refuses to work right. If anybody could point me in the right direction it'd be most appreciated. Thank you in advance.

    Read the article

  • Facebook "Like" button callback

    - by Matt
    Hello, I am interested in implementing the facebook "Like" button, but I would like to know what user is clicking on this button so I can get some useful information from this. From what I have read, facebook is leaving us in the dark on who is clicking on what. ANyone have an idea on how I could track which user clicked on a like button for a particular product?

    Read the article

  • iphone google maps crosshair button

    - by xastor
    I would like to use or emulate a button like the gps button in the bottom left corner of the standard maps application on the iphone OS. The button behaves like a toggle button where gps is enabled or disabled depending on whether it is pushed and it may hold a small spinner component while the gps is finding your position. Does anyone know if this component can be easily constructed using default components? If no, what would be the best way to develop such a component? Is the crosshair/target icon a generic icon that I can re-use?

    Read the article

  • Android ListView delete row button - focus issue

    - by Max Gontar
    I have an activity with ListView and buttons below: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <ListView android:id="@+id/lvLamps" android:layout_width="fill_parent" android:layout_height="fill_parent" android:listSelector="@null" android:choiceMode="none" android:scrollbarStyle="insideInset" android:layout_weight="1.0" /> <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_weight="0.0"> <Button android:id="@+id/btnAdd" android:background="@null" android:drawableLeft="@drawable/btn_upgrade" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableRight="@drawable/lbl_upgrade" android:textSize="0pt" android:text="" android:layout_alignParentLeft="true" android:padding="20px" /> <Button android:id="@+id/btnNext" android:background="@null" android:drawableRight="@drawable/next_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableLeft="@drawable/lbl_next" android:textSize="0pt" android:text="" android:layout_alignParentRight="true" android:padding="20px" android:visibility="gone" /> <ImageButton android:id="@+id/btnListExit" android:background="@null" android:src="@drawable/btn_x" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:padding="20px" /> </RelativeLayout> </LinearLayout> ListView row contains delete button: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:focusable="true"> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:focusable="true"> <ImageButton android:id="@+id/btnRowDelete" android:src="@drawable/btn_x" android:background="@null" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:padding="4px" android:focusable="true" android:focusableInTouchMode="true"/> <TextView android:id="@+id/txtLampRowFrom" android:text="123" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="6pt" android:layout_toRightOf="@id/btnRowDelete" android:focusable="false" android:textColor="@color/textColor"/> <TextView android:id="@+id/txtLampRowTo" android:text="123" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="6pt" android:layout_toRightOf="@id/btnRowDelete" android:layout_alignParentBottom="true" android:focusable="false" android:textColor="@color/textColor"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/arrow_upgrade_to" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:focusable="false"/> </RelativeLayout> </LinearLayout> In Adapter, Button onClickListener is set, also there are dummies to make list non-selectable: // disabling list items select public boolean areAllItemsEnabled() { return false; } public boolean isEnabled(int position) { return false; } What I want is: always show buttons in the bottom of screen after list (no matter how long it is, there should be scroll if it's too long) ListView should not be selectable, I don't want row selection row delete button should be selectable (focusable) with touch and with trackball And everything works except I can't focus row delete button with trackball (although it's working with touch). Can you help me? Thanks!

    Read the article

  • Disable Ribbon Button

    - by Raghu
    I want to disable and NOT hide a ribbon button (specifically Ribbon.ListItem.New.NewListItem) on a particular List type. On web I could find a lot many posts showing me ways to remove/hide buttons but none really worthwhile which could tell me how can I just disable an alrteady existing sharepoint button in my custom List type. e.g. Following code does remove the button instead of hiding. Id="RemoveRibbonButton" RegistrationType="List" RegistrationId="213908" Location="CommandUI.Ribbon"

    Read the article

  • Extending WPF Button to store data in a new property

    - by Jay
    I want to extend a WPF button to store some extra data, in a similar way to the current "Tag" property. Are attached properties the way forward? The data I want to store will be a URL Link string, for example I would like to be able to do something like: <Button Tag="BBC World News" URLLink="http://www.bbc.co.uk"/> Can anyone help me to understand how to extend the Button? Many thanks Jay

    Read the article

  • c# windows forms link button to listview

    - by Richard
    Hi, I am using c# windows forms. I have multiple buttons linked to a listview which when a button is pressed, a new item is added to the listview. The column headers in the listview are 'Name' and 'Amount'. When a different button is pressed, a different item is added to the listview. The thing i need help with is as follows: When the same button is pressed twice, I want the amount to go from "1" to "2" on the second click. So the item name isnt duplicated but the amount is increase. The problem is I am using text to link the button to the linklist at the moment e.g. ("Coca Cola", "1") which adds the item name as coca cola and the amount as 1. I know it is something to do with integers so please help!! Thanks

    Read the article

  • Remove clear button (grey x) to the right of UISearchBar when cancel button tapped

    - by David Foster
    Right, to begin my question, here's some screenies of the problem already solved by the Spotify app: Spotify's Step 1: Standard UISearchBar not in editing mode. Spotify's Step 2: UISearchBar now in editing mode. Search term entered. Cancel button slides in from the right, and the clear button (grey x) appears. Spotify's Step 3: Cancel button pressed; keyboard slides out and the search bar is no longer in editing mode. Search term remains and the grey x button is now hidden. At present, the following code fires off when my cancel button is pressed: - (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar { [searchBar resignFirstResponder]; [searchBar setShowsCancelButton:NO animated:YES]; } Which results in: My Step 3: Search bar now not in editing mode. Cancel button and keyboard has slid out. Search term remains but so does the grey x. So, my question is this: given that -resignFirstResponder (and -endEditing:, FYI) does not hide the grey x button when a search bar has had text entered into it, how does one hide it? Thanks again, friends.

    Read the article

  • gwt back button browser

    - by msaif
    for example current page is www.google.com. but i typed a different website address in address bar and clicked.This site has fully GWT code. but i like to back to the previous page of www.google.com. so i clicked back button of browser.but how can i get event of back button from current GWT code.Can i set any backbutton event handler in GWT of current page?? which notifies an alert to me that back button was pressed is there any solution from GWT??

    Read the article

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