Search Results

Search found 17464 results on 699 pages for 'radio button'.

Page 8/699 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • changing "enabled" value of a button during runtime in flex

    - by ruchir patwa
    i want to make a button disabled if a datagrid is empty and it should be enabled when there is atleast 1 entry.the entries in the grid are made at runtime.I tried this this is the button: <mx:Button id="update" label="Update Contact" enabled="{isButtonEnabled()}"/> and the function is defined as where dg_contact is the datagrid: public function isButtonEnabled():Boolean { if(dg_contact.selectedIndex==-1) { return false; } else { return true; } } where am i going wrong?

    Read the article

  • Keep PyGTK Button from Resizing on Label Change

    - by Cap
    I'm working on a PyGTK app with some Buttons that, when clicked, give a text entry dialog, then set the text on the button to whatever was entered in the box. The problem is that if the text is longer than the button can show, the button changes size to accomodate. How do I keep GTK Buttons from resizing when the text changes?

    Read the article

  • Different button's name at the opening of jquery dialog

    - by Luca Belluco
    Hello, I have a dialog form and when I open it I have the button "add a task", I would like to keep this "name", when I open the form from an empty case, but I want to have a button named "edit this task" when I open an already existing task. I also want to send the form with this button when I push enter key, no matter where I am on the form. Thank you.

    Read the article

  • Extjs 3.4 - Button Icon does not show or does not center

    - by Chris
    I want to fill a button with an icon I created but whatever I have tried just seems to put the icon either half cut off and way left, or it doesn't show at all. I've been trying different combinations of CSS and the icon, iconcls, cls button options. I was following the Ext 3 buttons example page but that doesn't seem to display anything for me... This code is an item inside my form panel (I try to replicate this with different buttons in the panel) { xtype: 'container', layout: { type: 'table', columns: 2, tableAttrs: { cellspacing: 5 } }, // padding: 5, pack: 'center', align: 'middle', items: [{ xtype: 'button', width: 40, // scale: 'medium', ref: '../drawToolsBtn', tooltip: 'Drawing Tools', icon: 'img/draw.png', iconAlign: 'top', baseCls: 'x-plain', // iconCls: 'drawBtn', enableToggle: true, // padding: 3, toggleHandler: function(btn, state) { this.showDrawToolsWin(state); }, scope: this },{ xtype: 'label', // columnWidth: 1, // remainder of container padding: 3, text: 'Click button to open Drawing Tools Menu' }] } CSS -------------------- .drawBtn{ background: url(../img/draw.png) !important; } Thank you for any help!

    Read the article

  • Why does this CSS button mess with <a> tags?

    - by Ian McCullough
    Here is my CSS button { border: 0 none; cursor: pointer; padding: 0 15px 0 0; text-align: center; height: 30px; line-height: 30px; width: auto; } button a { color:white; text-decoration:none; } button.rounded { background: transparent url(/images/button/btn_right.png) no-repeat scroll right top; clear: left; font-size: 0.8em; } button span { display: block; padding: 0 0 0 15px; position: relative; white-space: nowrap; height: 30px; line-height: 30px; } button.rounded span { background: transparent url(/images/button/btn_left.png) no-repeat scroll left top; color: #FFFFFF; } button.rounded:hover { background-position: 100% -30px; } button.rounded:hover span { background-position: 0% -30px; } button::-moz-focus-inner { border: none; } Here is the code for my "button" with a link in it. <button class="rounded"><span><a href="profile.php">Profile</a></span></button> The issue is it does not link to the href when i click on it. Anyone know why?

    Read the article

  • jQuery show hide divs on radio buttons

    - by RyanP13
    I have got a group of radio buttons that when clicked need to display a corresponding unordered list. I have got as far as showing the correct list according to which radio button is clicked but cannot figure out how to hide the other lists that need to be hidden. So if i click the second benefits radion then the second 'spend' ul will display and the other 'spend' uls will hide. This is my jQuery: // hide all except first ul $('div.chevron ul').not(':first').hide(); // $('div.chevron > ul > li > input[name=benefits]').live('click',function() { // work out which radio has been clicked var $radioClick = $(this).index('div.chevron > ul > li > input[name=benefits]'); var $radioClick = $radioClick + 1; $('div.chevron > ul').eq($radioClick).show(); }); // trigger click event to show spend list var $defaultRadio = $('div.chevron > ul > li > input:first[name=benefits]') $defaultRadio.trigger('click'); And this is my HTML: <div class="divider chevron"> <ul> <li><strong>What benefit are you most interested in?</strong></li> <li> <input type="radio" class="inlineSpace" name="benefits" id="firstBenefit" value="Dental" checked="checked" /> <label for="firstBenefit">Dental</label> </li> <li> <input type="radio" class="inlineSpace" name="benefits" id="secondBenefit" value="Optical" /> <label for="secondBenefit">Optical</label> </li> <li> <input type="radio" class="inlineSpace" name="benefits" id="thirdBenefit" value="Physiotherapy" /> <label for="thirdBenefit">Physiotherapy, osteopathy, chiropractic, acupuncture</label> </li> </ul> <ul> <li><strong>How much do you spend a year on Dental?</strong></li> <li> <input type="radio" class="inlineSpace" name="spend" id="rate1a" value="£50" /> <label for="rate1a">&pound;50</label> </li> <li> <input type="radio" class="inlineSpace" name="spend" id="rate2a" value="£100" /> <label for="rate2a">&pound;100</label> </li> <li> <input type="radio" class="inlineSpace" name="spend" id="rate3a" value="£150" /> <label for="rate3a">&pound;150</label> </li> </ul> <ul> <li><strong>How much do you spend a year on Optical?</strong></li> <li> <input type="radio" class="inlineSpace" name="spend" id="rate1b" value="£50" /> <label for="rate1a">&pound;50</label> </li> <li> <input type="radio" class="inlineSpace" name="spend" id="rate2b" value="£100" /> <label for="rate2a">&pound;100</label> </li> <li> <input type="radio" class="inlineSpace" name="spend" id="rate3b" value="£150" /> <label for="rate3a">&pound;150</label> </li> </ul> <ul> <li><strong>How much do you spend a year on Physiotherapy, osteopathy, chiropractic, acupuncture?</strong></li> <li> <input type="radio" class="inlineSpace" name="spend" id="rate1c" value="£50" /> <label for="rate1a">&pound;50</label> </li> <li> <input type="radio" class="inlineSpace" name="spend" id="rate2c" value="£100" /> <label for="rate2a">&pound;100</label> </li> <li> <input type="radio" class="inlineSpace" name="spend" id="rate3c" value="£150" /> <label for="rate3a">&pound;150</label> </li> </ul> <label class="button"><input type="submit" value="View your quote" class="submit" /></label> </div> I tried using: $('div.chevron > ul').not($radioClick).hide(); But that yielded a bad result where all the lists where hidden. Thanks in advance.

    Read the article

  • Christian Radio Locator iPhone app

    - by Tim Hibbard
    For the last three months or so I've been working on an iPhone (and iPad) app in my spare time. It all started when I took the kids to Minneapolis and had a hard time finding radio stations to listen to on the trip. I looked in the App Store for an app that would use my GPS to show me Christian radio stations nearby, but there wasn't one. So I decided to build my own. Using public information from the FCC and a few other sources, I built a database in Google docs that contains the frequency for all Christian radio stations, where the tower is located and how far the tower can reach. I also included any streaming audio information and other contact information like Facebook or Twitter that I could find. Google spreadsheets publish in JSON format (yes, really) and Xcode can automatically deserialize JSON into a properly formatted entity. This is one area that Xcode is far superior to C#. In a just a few lines of code, I can have a list of in-memory strongly typed objects from a web-based JSON feed. To accomplish the same thing natively in .NET would be much more work and wouldn't feel nearly as clean when it was said and done. The snazzy icon shown above was built by my very talented wife. She hasn't yet provided any feedback on the app's user interface, which is why it is so plain and boring. I used a navigation view controller and EGO pull to refresh table view to construct the main window. Pulling down to refresh initiates a GPS lookup, which queries the database for radio stations in range (yes, you can pass parameters to Google spreadsheets and get a subset back in JSON). Pulling up on the table extends the range of the search and includes stations that may not be close enough to get clear audio. This feature is not that intuitive and the next version contains an update to that functionality. Tapping a cell will show a detail view that displays additional information about the station. The user can click to view the station on a map, click to listen to an online stream (if available) or click to see the station's Facebook or Twitter pages. Swiping back and forth on the table changes the information that is displayed on the right hand side of the table cell. It scrolls through the city where the tower is located, how far the phone is from the tower, the range of the tower and in the next version a signal strength indicator. This was pretty easy to implement once I figured out how to assign the gesture recognizer delegate.  Tapping and holding on a cell will jump the user to the map view screen. Which is pretty cool, but very hard for even a power user to discover. To tackle the issue of discoverability, the next version has a series of instructions displayed at the bottom of the screen to show the user the various shortcuts. Once the user has performed the swipes and long holds, the instructions disappear. I've learned a lot developing this app. Spending over a decade exclusively in .NET made the learning curve a bit steep, but once I learned the structure and syntax of Objective-C, I've learned to appreciate the power and simplicity of it. Here are a few screenshots. I would really appreciate any feedback and especially iTunes reviews. Technically it is open source and a smart googler could probably find it. I just haven't promoted it as open source.     Cross posted from timhibbard.com

    Read the article

  • When a asp.net button is clicked, add #button to the url

    - by Blankman
    Using jquery, when a button is clicked (server side), I want to append #button to the url. This will only be used when there is validation errors, I want the browser to scroll to the bottom where the button is. I already tried MaintainScrollPositionOnPostback but it doesn't work here since the validation rows are made visible upon clicking the button.

    Read the article

  • How to maintain the state of button cutom listview in android

    - by Akshay
    I have custom ListView with three TextView three Button and three Chronometer. And the situation is I am loading the ListView properly.But while loading ListView I am disabling some button in the ListView by checking one parameter. Up to this point ListView is showing it's row properly. But when I am scrolling the ListView at that time previously enabled Button are getting disabled.What I am doing wrong I am not getting can one please point out my mistake Or any suggestion. Here is my Adapter class. public class OrderSmartKitchenAdapter extends BaseAdapter { private int flagDeliveryComplete = 0; private int flagPreparationComplete = 0; private int flagPreparationStarted = 0; private List<OrderitemdetailsBO> list = new ArrayList<OrderitemdetailsBO(); private int orderStatus; public OrderSmartKitchenAdapter() { // TODO Auto-generated constructor stub } public void setOrderList(List<OrderitemdetailsBO> orderList) { this.list = orderList; } @Override public int getCount() { // TODO Auto-generated method stub Log.i("OrderItemList Size :-", Integer.toString(list.size())); return list.size(); } @Override public Object getItem(int position) { // TODO Auto-generated method stub return null; } @Override public long getItemId(int position) { // TODO Auto-generated method stub return 0; } @Override public View getView(final int position, View convertView,ViewGroup parent) { // TODO Auto-generated method stub final ViewHolder viewHolder ; if (convertView == null) { layoutInflater = LayoutInflater.from(myContext); convertView = layoutInflater.inflate(R.layout.table_row_view,null); viewHolder = new ViewHolder(); viewHolder.txtTableNumber = (TextView) convertView.findViewById(R.id.txtTableNumber); viewHolder.txtMenuItem = (TextView) convertView.findViewById(R.id.txtMenuItem); viewHolder.txtQuantity = (TextView) convertView.findViewById(R.id.txtQuantity); viewHolder.txtOrderAcceptanceTime = (TextView) convertView.findViewById(R.id.txtOrderAcceptanceTime); viewHolder.txtElapsedTimeOfOrderAcceptance = (Chronometer) convertView.findViewById(R.id.txtElapsedTimeOfOrderAcceptance); viewHolder.btnPreparationStart = (Button) convertView.findViewById(R.id.btnPreparationStart); viewHolder.btnPreparationStart.setTag(position); viewHolder.txtElapsedTimeForPreparation = (Chronometer) convertView.findViewById(R.id.txtElapsedTimeForPrepatration); viewHolder.btnPreparationComplete = (Button) convertView.findViewById(R.id.btnPreparationCompleted); viewHolder.btnPreparationComplete.setTag(position); viewHolder.txtElapsedTimeForDeliveryComplete = (Chronometer) convertView.findViewById(R.id.txtElapsedTimeForCompleation); viewHolder.btnDeliveryComplete = (Button) convertView.findViewById(R.id.btnOrderComplete); viewHolder.btnDeliveryComplete.setTag(position); convertView.setTag(viewHolder); } else{ viewHolder = (ViewHolder)convertView.getTag(); viewHolder.btnDeliveryComplete.setTag(position); viewHolder.btnPreparationComplete.setTag(position); viewHolder.btnPreparationStart.setTag(position); } if (list.get(position) != null) { OrderitemdetailsBO orderitemdetailsBO = new OrderitemdetailsBO(); orderitemdetailsBO = list.get(position); viewHolder.txtTableNumber.setText(orderitemdetailsBO.getOrderitemid().toString()); viewHolder.txtMenuItem.setText(orderitemdetailsBO.getMenuitemname().toString()); viewHolder.txtQuantity.setText(orderitemdetailsBO.getQuantity().toString()); Log.i("Table Number :-", Long.toString(orderitemdetailsBO.getOrderitemid())); Log.i("Menu Name :-", orderitemdetailsBO.getMenuitemname().toString()); Log.i("Quantity", orderitemdetailsBO.getQuantity().toString()); Date acceptTime = new Date(); acceptTime = orderitemdetailsBO.getOrderdatetime(); viewHolder.txtOrderAcceptanceTime.setText(DateUtil.getDateAsString(acceptTime,"HH:mm")); Log.i("Order Accept Time :-", acceptTime.getMinutes() + ":"+ acceptTime.getSeconds()); orderStatus = orderitemdetailsBO.getOrderstatus(); Date preparationStartTime = new Date(); preparationStartTime = orderitemdetailsBO.getPreparationstarttime(); if(preparationStartTime != null) { Log.i("OrderSmartKitchenActivity", "2 Order Acceptance Time :-" + "Menu Item id "+ orderitemdetailsBO.getOrderitemid() + " Preparation Start time " + orderitemdetailsBO.getPreparationstarttime() ); viewHolder.txtElapsedTimeOfOrderAcceptance.stop(); Log.i("Preparation Start Time :-",preparationStartTime.getMinutes() + ":" + preparationStartTime.getSeconds()); viewHolder.txtElapsedTimeOfOrderAcceptance.setText(DateUtil.getDateAsString(preparationStartTime,"MM:ss")); viewHolder.txtElapsedTimeOfOrderAcceptance.stop(); viewHolder.btnPreparationStart.setEnabled(false); viewHolder.btnPreparationStart.setClickable(false); viewHolder.btnPreparationStart.setBackgroundColor(Color.LTGRAY); } else { Long n = acceptTime.getTime(); Log.i("OrderSmartKitchenActivity", "Order Acceptance Time :-" + "Menu Item id "+ orderitemdetailsBO.getOrderitemid() + " Acceptance time" + Long.toString(n) + " Preparation Start time " + orderitemdetailsBO.getPreparationstarttime() ); // Calculate Time difference viewHolder.txtElapsedTimeOfOrderAcceptance.setBase(SystemClock.elapsedRealtime() - System.currentTimeMillis() + n); viewHolder.txtElapsedTimeOfOrderAcceptance.getBase(); viewHolder.txtElapsedTimeOfOrderAcceptance.start(); viewHolder.txtElapsedTimeOfOrderAcceptance.setFormat("%s"); } viewHolder.btnPreparationStart.setOnClickListener(new OnClickListener() { @Override public void onClick(final View v) { // TODO Auto-generated method stub if (flagPreparationStarted == 0) { flagPreparationStarted++; v.startAnimation(playAnimation()); handler.postDelayed(new Runnable() { @Override public void run() { // TODO Auto-generated method stub v.clearAnimation(); Date currentTime = new Date(); // Set Preparation Start Time. viewHolder.txtElapsedTimeOfOrderAcceptance.stop(); Date setTime = new Date(currentTime.getTime() * 1000); OrderitemdetailsBO orderitemdetailsBO = list.get(position); orderitemdetailsBO.setPreparationstarttime(setTime); String orderDetails = "2"; String getPosition = Integer.toString(position); viewHolder.btnPreparationStart.setBackgroundColor(Color.LTGRAY); new sendOrderStatusToServer().execute(orderDetails,getPosition); } }, 5000); } else { handler.removeCallbacksAndMessages(null); v.clearAnimation(); flagPreparationStarted = 0; Log.i("Handler Removed. :-", "Here"); } } }); String preparationTime = orderitemdetailsBO.getOrderpreparationtime(); if(preparationTime != null && orderStatus == order_preparationComplete) { viewHolder.txtElapsedTimeForPreparation.setText(preparationTime); viewHolder.txtElapsedTimeForPreparation.stop(); viewHolder.btnPreparationComplete.getTag(position); viewHolder.btnPreparationComplete.setEnabled(false); viewHolder.btnPreparationComplete.setClickable(false); viewHolder.btnPreparationComplete.setBackgroundColor(Color.LTGRAY); } else if( orderStatus == order_preparationStart || orderStatus == orderReceived || orderStatus == order_delivered){ Long n = acceptTime.getTime(); Log.i("Preparation Start Time :-", Long.toString(n)); viewHolder.txtElapsedTimeForPreparation.setBase(SystemClock.elapsedRealtime() - System.currentTimeMillis() + n); viewHolder.txtElapsedTimeForPreparation.getBase(); viewHolder.txtElapsedTimeForPreparation.start(); viewHolder.txtElapsedTimeForPreparation.setFormat("%s"); } viewHolder.btnPreparationComplete.setOnClickListener(new OnClickListener() { @Override public void onClick(final View v) { // TODO Auto-generated method if (flagPreparationComplete == 0) { flagPreparationComplete++; v.startAnimation(playAnimation()); handler.postDelayed(new Runnable() { @Override public void run() { // TODO Auto-generated method stub v.clearAnimation(); OrderitemdetailsBO orderitemdetailsBO = list.get(position); Date date = orderitemdetailsBO.getPreparationstarttime(); if(date != null) { viewHolder.txtElapsedTimeForPreparation.stop(); Date currentTime = new Date(); Calendar calendar = Calendar.getInstance(); int minute = calendar.get(Calendar.MINUTE); int second = calendar.get(Calendar.SECOND); orderitemdetailsBO.setOrderpreparationtime(calendar.get(Calendar.MINUTE) +":" +calendar.get(Calendar.SECOND)); String orderDetails = "3"; String getPosition = Integer.toString(position); viewHolder.btnPreparationComplete.setBackgroundColor(Color.LTGRAY); new sendOrderStatusToServer().execute(orderDetails,getPosition); } else { Toast.makeText(myContext, "Please Enter Preparation Start Time.", Toast.LENGTH_LONG).show(); } } }, 5000); } else { handler.removeCallbacksAndMessages(null); v.clearAnimation(); flagPreparationComplete = 0; } } }); String deleveredTime = orderitemdetailsBO.getOrderdeliverytime(); if(deleveredTime != null && orderStatus == order_delivered) { Date delevered = new Date(Long.parseLong(deleveredTime)); viewHolder.txtElapsedTimeForPreparation.setText(DateUtil.getDateAsString(delevered,"MM:ss")); Log.i("Preparation Start Time :-", delevered.getMinutes()+":"+delevered.getSeconds()); viewHolder.txtElapsedTimeForPreparation.stop(); viewHolder.btnDeliveryComplete.getTag(position); viewHolder.btnDeliveryComplete.setEnabled(false); viewHolder.btnDeliveryComplete.setClickable(false); viewHolder.btnDeliveryComplete.setBackgroundColor(Color.LTGRAY); } else if(orderStatus == 3 || orderStatus == 2 || orderStatus == 1) { Long n = acceptTime.getTime(); Log.i("Preparation Start Time :-", Long.toString(n)); viewHolder.txtElapsedTimeForDeliveryComplete.setTag(list.get(position)); viewHolder.txtElapsedTimeForDeliveryComplete.setBase(SystemClock.elapsedRealtime() - System.currentTimeMillis() + n); viewHolder.txtElapsedTimeForDeliveryComplete.getBase(); viewHolder.txtElapsedTimeForDeliveryComplete.start(); viewHolder.txtElapsedTimeForDeliveryComplete.setFormat("%s"); } viewHolder.btnDeliveryComplete.setOnClickListener(new OnClickListener() { @Override public void onClick(final View v) { // TODO Auto-generated method stub if (flagDeliveryComplete == 0) { flagDeliveryComplete++; v.startAnimation(playAnimation()); handler.postDelayed(new Runnable() { @Override public void run() { // TODO Auto-generated method stub v.clearAnimation(); OrderitemdetailsBO orderitemdetailsBO = list.get(position); Date date = orderitemdetailsBO.getPreparationstarttime(); String preparationComplete = orderitemdetailsBO.getOrderpreparationtime(); if(date != null && preparationComplete != null ) { Date currentTime = new Date(); Calendar calendar = Calendar.getInstance(); viewHolder.txtElapsedTimeForDeliveryComplete.stop(); orderitemdetailsBO.setOrderdeliverytime(calendar.get(Calendar.MINUTE) +":"+calendar.get(Calendar.SECOND)); String orderDetails = Integer.toString(order_delivered); String getPosition = Integer.toString(position); viewHolder.btnDeliveryComplete.setBackgroundColor(Color.LTGRAY); new sendOrderStatusToServer().execute(orderDetails,getPosition); } else { Toast.makeText(myContext, "Please Enter Preparation Start Time & Preparation Complete Time.", Toast.LENGTH_LONG).show(); } } }, 5000); } else { handler.removeCallbacksAndMessages(null); v.clearAnimation(); flagDeliveryComplete = 0; } } }); } return convertView; } } private static class ViewHolder { protected TextView txtTableNumber; protected TextView txtMenuItem; protected TextView txtQuantity; protected TextView txtOrderAcceptanceTime; protected Chronometer txtElapsedTimeOfOrderAcceptance; protected Button btnPreparationStart; protected Chronometer txtElapsedTimeForPreparation; protected Button btnPreparationComplete; protected Chronometer txtElapsedTimeForDeliveryComplete; protected Button btnDeliveryComplete; }

    Read the article

  • how can we change the value by using radio buttons

    - by magna
    I am making a website in Adobe Dreamweaver with php. In the site there’s a 3 buttons for selecting payment method that will act as the continue button. What I want is when the user checks a radio buttons (I agree button), it will be add with that amount and display with previous amount.. there is three buttons which has the corresponding values(amount in pounds).. plz check my website http://www.spsmobile.co.uk in this linkgo to mobile phone unlocking and after add the cart click make payment it will go to next page there is a delivery mail details.. for that delivery mail details only am asking.. here i mentioned code: <input id="radio-1" type="radio" name="rmr" value="1"> <label for="radio-1">£3</label> <input id="radio-2" type="radio" name="rmr" value="2"> <label for="radio-2">£5.5</label> <input id="radio-3" type="radio" name="rmr" value="4"> <label for="radio-3">£10</label> <div class="total-text" style="font-size:36px">£10</div> var total = parseInt($("div.total-text").text().substring(1), 10); $("input[name='rmr']").bind('change', function() { var amount = 0; switch (this.value) { case "1": amount = 3; break; case "2": amount = 5.5; break; case "4": amount = 10; break; } $("div.total-text").text("£" + (total + amount)); }); but there is no change , my previous amount did not add with that. while am clicking previous amount only displayed on browser.. i need when i cliks radio button the value should change correspondingly.. where i did that mistake...plz give me some idea and what should i do..is there any need for storing db.. thanks in adv

    Read the article

  • Programming an Android Button to update EditText views

    - by bergler77
    Ok guys, I have a button in android that i'm trying to use to update 8 EditText Views with different random numbers. Everything works up until I click the button. It appears I am missing a resource according to the debugger, but I'm not sure what. I've tried several different ways of implementing the button. Here is what I have after looking at several posts. import java.util.Random; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class MyCharNewChar extends MyCharActivity { private OnClickListener randomButtonListener = new OnClickListener(){ public void onClick(View v) { //Button creates a set of random numbers and updates the values //of the EditText views. Random rand = new Random(); int STR = 1 + rand.nextInt(12); int AGI = 1 + rand.nextInt(12); int DEX = 1 + rand.nextInt(12); int WIS = 1 + rand.nextInt(12); int INT = 1 + rand.nextInt(12); int CON = 1 + rand.nextInt(12); int HP = 1 + rand.nextInt(20); int AC = 1 + rand.nextInt(6); EditText str = (EditText) findViewById(R.id.str); str.setText(STR); EditText agi = (EditText) findViewById(R.id.agi); agi.setText(AGI); EditText dex = (EditText) findViewById(R.id.dex); dex.setText(DEX); EditText wis = (EditText) findViewById(R.id.wis); wis.setText(WIS); EditText intel = (EditText) findViewById(R.id.intel); intel.setText(INT); EditText con = (EditText) findViewById(R.id.con); con.setText(CON); EditText hp = (EditText) findViewById(R.id.baseHP); hp.setText(HP); EditText ac = (EditText) findViewById(R.id.baseAC); ac.setText(AC); } }; @Override public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.newchar); Button randomButton = (Button) findViewById(R.id.randomButton); randomButton.setOnClickListener(randomButtonListener); } } Here is the xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linearlayoutNew1" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@drawable/background" > <TextView android:id="@+id/newCharLabel" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/new_character_screen" android:textSize="24dp" android:textColor="@color/splash" android:textStyle="bold" android:gravity="center"/> <TextView android:id="@+id/nameLabel" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/nameLabel" android:textSize="18dp" android:textColor="@color/splash"/> <EditText android:id="@+id/editText1" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:inputType="textPersonName" > <requestFocus /> </EditText> <TableLayout android:id="@+id/statsLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="5dp"> <TableRow android:id="@+id/tableRow01" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="5dp"> <TextView android:id="@+id/strLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/strLabel" android:textSize="18dp" android:textColor="@color/splash"/> <EditText android:id="@+id/str" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="3" android:inputType="number" /> <TextView android:id="@+id/agiLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/agiLabel" android:textSize="18dp" android:textColor="@color/splash"/> <EditText android:id="@+id/agi" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="3" android:inputType="number"/> <TextView android:id="@+id/dexLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/dexLabel" android:textSize="18dp" android:textColor="@color/splash"/> <EditText android:id="@+id/dex" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="3" android:inputType="number"/> </TableRow> <TableRow android:id="@+id/tableRow02" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="5dp"> <TextView android:id="@+id/intLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/intLabel" android:textSize="18dp" android:textColor="@color/splash"/> <EditText android:id="@+id/intel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="3" android:inputType="number"/> <TextView android:id="@+id/wisLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/wisLabel" android:textSize="18dp" android:textColor="@color/splash"/> <EditText android:id="@+id/wis" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="3" android:inputType="number"/> <TextView android:id="@+id/conLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/conLabel" android:textSize="18dp" android:textColor="@color/splash"/> <EditText android:id="@+id/con" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="3" android:inputType="number"/> </TableRow> </TableLayout> <LinearLayout android:id="@+id/linearlayoutNew02" android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="5dp" android:gravity="center"> <TextView android:id="@+id/baseHPLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hpLabel" android:textSize="18dp" android:textColor="@color/splash"/> <EditText android:id="@+id/baseHP" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="3" android:inputType="number"/> <TextView android:id="@+id/baseACLabel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/acLabel" android:textSize="18dp" android:textColor="@color/splash"/> <EditText android:id="@+id/baseAC" android:layout_width="wrap_content" android:layout_height="wrap_content" android:ems="3" android:inputType="number"/> </LinearLayout> <LinearLayout android:id="@+id/linearlayoutNew03" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:id="@+id/randomButton" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="@string/randomButton" android:textSize="16dp" android:clickable="true"/> </LinearLayout> </LinearLayout> I have also tried setting the onClick in xml to setup a specific onClick method. Still the same error so I must have a problem elsewhere. Any suggestions would be great!

    Read the article

  • Button click doesn't call function even when button attribute OnClick is set to that function

    - by Silmaril89
    Hi, I have an aspx page with two buttons, one of the buttons has an OnClick attribute to a function that should be run when clicked. When the other button is clicked there is an if statement checking if the page is a postback, if it is then I run some statements that need to be run when that button is clicked. That postback button works fine. However, the other button, when it's clicked the function it's supposed to call never executes, and the statements inside if (Page.IsPostBack) get executed instead. What can I do to fix this? Is there a way to make the button that calls a function not do a Post back?

    Read the article

  • jQuery UI split button toggle - toggle both parts of the button

    - by the berserker
    I would like to implement a toggle splitbutton with jQuery UI that would on toggle action change the style of the "dropdown" part as well (as seen in http://jsfiddle.net/8khz2/3/ - I'd like to appear it on 1st click as white, same as "Toggle" button does). Does anyone see a way to achieve that out of the box or only with CSS, without additional javascript code? Somehow I don't see an option doing it only with CSS, since I can not nest the "dropdown" button in "Toggle", since toggle part is checkbox: <input type="checkbox" id="toggle"/><label for="toggle">Toggle</label> <button id="select">Select an action</button> The jsfiddle example is based on: http://jqueryui.com/button/#splitbutton

    Read the article

  • JqGrid Add custom button to Row

    - by oirfc
    Hi there, I am trying to add a custom button to a JqGrid that implements a 'Check Out' process. Basically, every row has a 'Check Out' button that if clicked should be able to send a post back to the server and update a shopping cart and then change the button text to 'Undo Check Out'. So far I have: colNames: ['Id', ... , 'Action' ], colModel: [ { name: 'Id', sortable: false, width: 1, hidden: true}, ... { name: 'action', index: 'action', width: 75, sortable: false } ], ... gridComplete: function() { var ids = jQuery("#east-grid").jqGrid('getDataIDs'); for (var i = 0; i < ids.length; i++) { var cl = ids[i]; checkout = "<input style='height:22px;width:75px;' type='button' value='Check Out' onclick=\" ??? \" />"; jQuery("#east-grid").jqGrid('setRowData', ids[i], { action: checkout }); } }, ... Where '???' is the part I need to solve. Thank you in advance for your help.

    Read the article

  • Add icon on spark button skin

    - by Jerry
    Hello all I am trying to add different icon on different buttons. I have my skin file ready but not sure if I have to create different skin class for different button. It sounds inefficient. Any suggestions? Thanks for the reply... <s:Button id="pass" width="110" height="35" fontWeight="bold" fontSize="12" fontFamily="arial" label="Past Track" data="@Embed('assets/IconAirplain.png')" click="pass_clickHandler(event)" skinClass="skins.CustomSkin"/> <s:Button id="future" width="110" height="20" fontWeight="bold" fontSize="12" fontFamily="arial" label="Future Plan" click="future_clickHandler(event)" skinClass="skins.CustomSkin"/> Skin..... <!-- layer 2: fill --> <!--- @private --> <s:Rect id="fill" left="1" right="1" top="1" bottom="1" radiusX="2"> <s:fill> <s:LinearGradient rotation="90"> <s:GradientEntry color="#304fd7" color.over="#4b6bf6" color.down="0xAAAAAA" alpha="0.85" /> <s:GradientEntry color="#1f38a3" color.over="#3653cf" color.down="0x929496" alpha="0.85" /> </s:LinearGradient> </s:fill> </s:Rect> <!-- icon --> // I could add my icon here but that would make me to create //different icon image for different button

    Read the article

  • AutoHotkey media button for the NextSong button on Pandora

    - by Christian
    I tried doing the same thing that had been advised to do on the Play/pause pandora.com with a media key answer page. I simply replaced the XXX with 119 after running GetMediaKey - instead of 122 (it was same for me), which worked just fine for its play/pause purpose. I also replaced the YY with 11 since it was the appropriate (and next) tab. It does put the small, orange, dotted square around the next song button, but instead of going to the next song, it just acts like play/pause. Is there another modification required? Using Google Chrome in Windows 7 on an Alienware m14x r2.

    Read the article

  • IE8: weird border around HTML button element

    - by s427
    I have a button element with a custom background (image+color) and no borders except for a 2px border-bottom (and a bunch of other properties --code below) which renders quite differently in Firefox and in IE8. The problem is, this is a work for a company that uses IE8 as their only browser, so it's important that the button renders well in IE8. Here's a visual comparison between the two: My question here is not about the padding difference (I'm looking into that), but about the weird border that is visible on IE8 in addition to the regular border (border-bottom). Can anyone explain to me where it comes from and how to get rid of it? Thanks in advance. Here is the HTML code: <button class="btn" id="c_edit"> <span>Annuler</span> </button> And here is the CSS: .btn { display: inline-block; margin: 0 0 7px 5px; padding: 0; color: #ddd; font-size: 14px; font-family: FrutigerLTStd55Roman, sans-serif; text-decoration: none; border: none; border-bottom: 2px solid #222; background-color: #999; background-image: url('img/btn_bg.gif'); background-position: 0 bottom; background-repeat: repeat-x; cursor: pointer; transition: all .5s ease-out; } .btn span { display: inline-block; margin: 0; padding: 8px 10px 6px 40px; background-color: transparent; background-position: 4px 0; background-repeat: no-repeat; }

    Read the article

  • Silverlight: Button template with texttrimming cut off

    - by dex3703
    I'm replacing the default Button template's ContentPresenter with a TextBlock, so the text can be trimmed when it's too long. Works fine in WPF. In Silverlight the text gets pushed to one edge and cut off on the left, even when there's space on the right: Template is nothing special, just replaced the ContentPresenter with the TextBlock: <Border x:Name="bdrBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" /> <Rectangle x:Name="rectMouseOverVisualElement" Opacity="0"> <Rectangle.Fill> <SolidColorBrush x:Name="rectMouseOverColor" Color="{StaticResource MouseOverItemBgColor}"/> </Rectangle.Fill> </Rectangle> <Rectangle x:Name="rectPressedVisualElement" Opacity="0" Style="{TemplateBinding Tag}"/> <TextBlock x:Name="textblock" Text="{TemplateBinding Content}" TextTrimming="WordEllipsis" TextWrapping="NoWrap" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> <Rectangle x:Name="rectDisabledVisualElement" Opacity="0" Style="{StaticResource RectangleDisabledStyle}"/> <Rectangle x:Name="rectFocusVisualElement" Opacity="0" Style="{StaticResource RectangleFocusStyle}"/> </Grid> </ControlTemplate> How do I fix this? More info: With the latest comment about HorizontalAlignment, it's clear that SL's implementation of TextTrimming differs from WPF's. In SL, TextTrimming only really works if the text is aligned left. SL isn't smart enough to align the text the way WPF does. For instance: WPF button: SL button with the textblock horizontalalignment = left: SL button with textblock horizontalalignment = center:

    Read the article

  • Uncheck Radio Button on Double Click

    - by Rajneesh Verma
    Hi, Recently I got one requirement that i have to uncheck radio button list when a user double click it (Try to uncheck). I did this using JAVA Script. Below is the code. Designer: 1: < head runat ="server" > 2: < title > :Radio Button List Demo: </ title > 3: < script language ="javascript" type ="text/javascript" > 1:   2: //Global variable to store selectedvalue 3: var lastchecked = "" ; 4:   5: function rblSelectedValue...(read more)

    Read the article

  • Rhythmbox plugin radio-browser crashes

    - by Marco
    I have just installed the plugins package from fossfreedom repository on my Rhythmbox 2.96 running on 12.04 (64 bit). The radio-browser plugin crashes Rhythmbox after a few seconds of playing. When I restarted Rhythmbox after the crash, the plugin was marked as "error" and it is impossible to reinstall it. I've then manually removed (sudo apt-get remove ...) and reinstalled it but still I can't enable it. Unfortunately, radio-browser was the reason for me to install the plugin package, and I can't use it... Help please?

    Read the article

  • Misadventures at Radio Shack

    - by Chris Williams
    While I'm waiting for my Arduino kits to show up, I started reading the Getting Started With Arduino book from O'Reilly (review coming later) and I'm about 40 pages in when I get to a parts list for one of the first projects. Looks pretty straightforward, and even has Radio Shack part numbers next to almost everything. So on my lunch today, I decided to run out to "The Shack" (seriously, that's their rebranding?) to pick up some basics, like a couple resistors, a breadboard, a momentary switch and a pack of pre-cut jumper wires. I found the resistors without any difficulty, and while they didn't have the exact switch I wanted, it was easy enough to find one that would do. That's where my good luck abruptly ended. I was surprised that I couldn't find a breadboard or any jumper wires, so while I was looking around, a guy came up and asked me if I needed some help. I told him I did, explained what I needed and even gave him the Radio Shack part number for the pack of jumper wires. After a couple minutes he says he can't find anything in the system, which was unfortunate but not the end of the world.  So then I asked him about the breadboard, and he pointed me to some blank circuitboards (which are not the same thing) and I said (nicely) that those weren't breadboards and attempted to explain (again) what I needed, at which point he says to me "I don't even know what the hell you're looking for!" I stood there for a moment and tried to process his words. About that time, another salesperson came up and asked what I was trying to find. I told her I needed a breadboard, and she pointed to the blank circuit boards and said "they're right in front of you..." After seeing the look on my face, she thought for a minute and said... "OH! you mean those white things. We don't have those anymore." I thanked her, set everything down on the counter and left. (I wasn't going to buy only half the stuff I needed.. and I was pretty sure I was never going to be buying ANYTHING at that particular location ever again.) Guess I'll be ordering more stuff online at this point. It's a shame really, because I used to LOVE going to Radio Shack as a kid, and looking through all the cool electronics components and stuff, even if I didnt understand what most of them were at the time. Seems like the only thing they carry in any quantity/variety now is cell phones and random stereo connectors.

    Read the article

  • Ubuntu for Internet radio

    - by user93100
    I am planning to set up a streaming server purely for internet radio using Icecast2. what software packages do i require during Ubuntu installation and any third party apps i may require. I am going to use BUTT(Broadcast using this tool) Encoder and would like to be able to run BUTT on any computer so that other people can broadcast to my server from anywhere. I am looking for tips or tutorials on how to achieve the above. I mainly need info on cofiguring Ubuntu Server and icecast2. Also GUI? if so what one. Preferablly lightweight. I am choosing Ubuntu for its level of security and reliability. I hope someone can help me as i plan to make this a community Radio station. Many Thanks Khz

    Read the article

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