FAQ Database Discussion Community


C# Delete Row with Dynamic Textbox/Button/Grid

c#,wpf,button,dynamic,textbox
I've tested some thinks with Dynamic Textboxes and Buttons, Adding Items to my Grid works very well, but if I want to Delete it there are some Bugs, sometimes 1 Row is empty and my Add Button disappears or my Program crashs. What did I wrong or what did I...

Set border around imageview with no background in javafx

button,javafx,imageview,javafx-8,javafx-css
I would like to have a button or a clickable ImageView in my program. When clicked i would like to have a border to appear in a shape of the imageview. This image had no background, but i can't find a way to specify the border's shape. For example: http://vignette3.wikia.nocookie.net/forgeofempires/images/b/b8/Castel_del_Monte.png/revision/latest?cb=20130101150554...

change content button with trigger

wpf,button,triggers,controltemplates
I want change the content of the button to another image when it is pressed but nothing happens. <Grid> <Button Height="120" Width="75"> <Button.Template> <ControlTemplate TargetType="Button"> <Image Source="no-press.png"/> <ControlTemplate.Triggers> <Trigger Property="IsPressed" Value="True"> <Setter Property="Content"> <Setter.Value> <DataTemplate> <Image Source="press.png"/> </DataTemplate> </Setter.Value> </Setter> </Trigger>...

How to fix my tooltip that is not working with grid of buttons?

javascript,html5,twitter-bootstrap,button
I was reading the bootstrap api for tooltip. I built a grid of buttons and I want to be able to have a tooltip show when I do a mouseover of a button. Problem See the picture. This is the normal grid. Look at the picture below. Notice how all...

Adding a timed delay after pressing a button to prevent button spam

javascript,html,css,button
Say I have 4 buttons <button id="one">One</button> <button id="two">Two</button> <button id="three">Three</button> <button id="four">Four</button> and to prevent spam, I want to make it so that whenever any of the buttons are pressed, none of them are able to be pressed again for the next 0.6 seconds. How might I achieve this?...

Characters appear in the order as i click

android,button,textview
For example. There is picture on the top of the screen below that there are some empty boxes and below the boxes there are some buttons. Every button has a character for text("a","c","t"). You click on a button and the button's text appear in the box. You can click them...

Android : Unable to change width of dynamic button

java,android,button,dynamic,layoutparams
I am trying to make dynamic buttons of fixed dimensions. I am able to alter the height but unable to change the width. The width of the button seems to MATCH_PARENT (it takes up whole screen width. If there are two buttons, each button width is half screen width and...

AS3: Fast hovering doesn't execute rollOut

actionscript-3,flash,button
I'm having a serious problem that is getting me nervous: I've made a button _btn that includes ROLLOVER and ROLLOUT animations with coding (an nested movieclip instance called barra that increases to half alpha when you hover over and decreases when you hover out). [Here it should go a descriptive...

How to disable a button after a certain date [JAVA]

java,button
I was wondering how I could disable a button after a date like July 4, 2015? I have found an example on this site of how to disable a button on that date but not the subsequent days after that date. FROM Example: Calendar today = Calendar.getInstance(); int dayOfMonth =...

How to Randomly Choose Button Text in Java?

java,android,button,random
Friends, I am a Civil Engineer. Now i am working now in Android Developing. I know Java and C# but i am mentally set my Programming knowledge is only editing like Reading and Understand. How to increase my skill like writing Programs Specially for C# and Java. Thank You. then...

Is there a JSF toggle component or a way to theme an h:selectBooleanCheckbox with images?

jsf,button,checkbox,toggle
I tried using a toggle like below. Although it works, it breaks when used inside of a composite component - changing the singleSelect value outside of the component never updates inside the component: <h:commandButton disabled="#{cc.attrs.singleSelect}" image="/resources/img/collapse-single.gif"> <f:ajax listener="#{cc.toggleSingleSelect}" render="#{cc.clientId}"/> </h:commandButton> <h:commandButton disabled="#{! cc.attrs.singleSelect}" image="/resources/img/expand-single.gif"> <f:ajax...

Multiple screen support Windows Phone 8

c#,button,windows-phone-8,background-image
I used to develop for Android and iOS, and for multiple screen support we use to use mdpi, hdpi, xhdpi. Now I want to develop for Windows Phone, I want to set a background to a button and I don't know how to define image size to support all screen...

Back Button in ActionBar at MainActivity

java,android,button,back
I have implemented a Back-Button for all Activities except the MainActivity. My Problem is that i have a Back-Button in that MainActivity too. Hopefully I've imported the right class: import android.support.v4.app.NavUtils; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); getActionBar().setDisplayHomeAsUpEnabled(true); [...] } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action...

Retrieve value from input next to a button using THIS selector

javascript,jquery,button,input,this
I ran into this problem, I have two siblings, an input and a button which calls a function to retrieve the value in the input, but it keeps telling me that Value is Undefined... Here's the "form": <li> <input id="mem3" value="TestU4" disabled=""> <button id="del3" class="delmem" onclick="deleteBandMember();">remove</button> </li> Here's jQuery Code:...

XML / Java Could not find method error when Button is used to edit TextView

java,android,xml,button,textview
I am realitavely new to Java coding and am trying to create an android app (I want it to calculate my max one rep max for weightlifting) sp that it will use a button press to update a text view. The code I am currently using is causing my app...

How can I keep a group of buttons centralized on the right side of the footer?

html,css,button,footer
I've been trying to keep four buttons centralized on the right side of the footer, but it seems like the footer is set to percentage instead of pixels, I've tried to set it to percentage, but it ignores my "orders", how can I set the footer to 60px, and put...

How do I change the icon of a button in livecode, using code and not the inspector tool?

button,live,livecode
I want to have a button change appearance when certain events occur. I thought the code would look something like this: on mouseUp set the icon of this button to the id 1044 end mouseUp The icon of the button is its normal appearance and in inspector when you put...

How do I stop a button from triggering when the enter key is pressed? (focused)

vb.net,forms,button,focus
(I would say hello here, but Stackoverflow always removes it for some reason) My problem is that on my Visual Basic form the button that I use to close the form can be triggered by the enter key. This is a problem because my form opens a webpage that frequently...

How can I make a button who draws a line

javascript,html,button,canvas,htmlbutton
I want to create a button that draws a line (with canvas) in HTML. I already tried something with CSS ( with display:none ) but it didn't work. How can I make it?

Python tkinter button lagging/printing upon exit

python,user-interface,button,tkinter,canopy
First of all note that I am doing all these in Enthought/Canopy. I have this basic GUI where it has 4 entry boxes in which you type stuff, and then you hit a button and it prints the stuff you entered. However, it is not operating the way I want...

How to handle event from multiple buttons of same name

javascript,html,button,event-handling,elements
I am working on a small practice program where I have 3 white boxes in a row. My goal is (using Javascript) for any of the boxes to change from white to red when the mouse is over the box, and then to turn yellow when the mouse comes off...

WPF custom button

wpf,button,styles
I start to learn WPF and there is something that is still unclear for me: i created new Style for button: <!-- no border button style --> <Style x:Key="NoBorderButton" TargetType="Button"> <Setter Property="Foreground" Value="White" /> <Setter Property="Background" Value="Transparent" /> <Setter Property="BorderBrush" Value="Transparent" /> <Setter Property="BorderThickness" Value="0" /> <Style.Triggers> <Trigger Property="Control.IsMouseOver" Value="true">...

My button doesn't work

android,button
This is the main activity, where I click the button public class NewAddMarketingProg extends Activity implements OnClickListener { private StartAppAd startAppAd; String note_detail; ListView lvNote; String[] data; private int mIndex; private MarketingProgramsAdapter adapter; private Context context; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); /* StartAppSDK.init(this, getString(R.string.account_id), getString(R.string.app_id), true);*/ setContentView(R.layout.newaddmarketingprog);...

How to add text in between words in edittext when a button is pressed

android,button,android-studio,android-edittext
I cannot figure out how to add a space between every word the user types into an edittext as I am still a beginner. I have typed the obvious code below. findViewById(R.id.button).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { EditText editText = (EditText) findViewById(R.id.editText); EditText editText2 = (EditText) findViewById(R.id.editText2);...

How do i display button value in a text field in JavaScript(not JQuery) [closed]

javascript,html5,button,calculator
i have made a simple calculator and i am unable to print the value of my buttons on click onto the text field. How do i do that? I want to use JavaScript only, not JQuery. When i click on my buttons the values are not displaying on the text...

Creating 26 alphabet letter buttons with the for loop and String.fromCharCode()

javascript,button,for-loop,alphabet
here is some HTML Code as example: <button onclick="setLetter('A');">A</button> <button onclick="setLetter('B');">B</button> <button onclick="setLetter('C');">C</button> <button onclick="setLetter('D');">D</button> <button onclick="setLetter('E');">E</button> <button onclick="setLetter('F');">F</button> <button onclick="setLetter('G');">G</button> <button onclick="setLetter('H');">H</button> <button...

How can i ensure that moves sent over a network in a tic tac toe game does not overwrite the previous moves that were made

c#,.net,forms,button
I am creating a tic tac toe game that has networking capabilities. Everything is working fine except for one logic error that cannot seem to figure out. The issue is that when playing over a network, if player X makes a move then player O makes a move the previous...

Give value to Database by Pressing button

php,database,button,value
So i ran into some trouble not to long ago. As a student i am relativly new to programming and thus i often visit sites like these for help. My question is how can i add value to database by pressing a button. For me the problem here is that...

Hiding a button remotely

ios,objective-c,button,httpwebrequest
I am trying to make it so that I can hide and unhide a button while my app is in the store (without me constantly updating the app and waiting for it to be reviewed). The idea I had was to download a value from my website html, let's say...

Active Bootstrap Buttons

jquery,twitter-bootstrap,button
I have just been playing around with Bootstraps Button Group to show and hide div's on my webpage. Perhaps I am being dumb, but could anyone point me in the right direction for making the selected button active when clicked? HTML (Buttons): <div class="btn-group" role="group" aria-label="..."> <button id="1" type="button" class="btn...

How to check button clicked in new UI button of unity 5.0

button,unity3d
I added the new UI buttons of unity 5.0 in place of the old GUI texture buttons in these buttons how to i check when the button has been pressed and released and how to make the Onclick event keep repeating itself...

Delay in JQuery Function (Button Load State)

javascript,jquery,ajax,forms,button
I have form validation set up to where it will create some Google Documents using Ajax requests and then submit the form to create an entry in a database, once everything in the form is validated. The actions to be taken after validation are specified by the submitHandler: submitHandler: function(form)...

I want my button to call a method in a fragment

android,button,fragment
So I have (WorkoutList Activity) -> (WorkoutList Fragment) -> (ExerciseList Fragment) -> (addExercise Fragment) Theres a button in AddExercise, and I want it to invoke a method in ExerciseList The problem is that with the current set-up I'm getting `Attempt to invoke virtual method void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object...

Adjust TextBlock on a Button within a Grid

wpf,xaml,button,alignment,textblock
I have two buttons on a grid. On the right button there should be some text shown left aligned and another text right aligned. In all my tries so far the two strings are positioned in the center of the button and not left and right. Once this is solved...

normal Button with onclick event inside a form doesn't work

javascript,button
i tried to add a inside a formular. This button is connected with a javascript per onclick event. so i made the following: <!DOCTYPE html> <html> <body> <form> <fieldset> <div id="table_output"></div> <legend>Behandlungstremin</legend> <button name="add_termin" id="add_termin" onclick="add_termin()">+ Termin</button> </fieldset> <br> <input type="submit" class="submit" value="Rechnug erstellen" name="submit" id="submit"> </div> <script> function...

Button Click Moves Entire HTML Body

jquery,html,css,button,drop-down-menu
I have a very basic webpage-setup that includes a drop-down menu that is triggered by a button click. When I click on the button, the drop-down menu reveals itself but also shifts the entire contents of that page. I'm not sure what is causing this and would appreciate any help....

'Submit' button in Bootstrap scrolling to top

php,twitter-bootstrap,button,bootstrap
I have created a single page portfolio template using Bootstrap framework from Twitter. I am having an issue that when I click on "Submit" button in the contact form, the page scrolls all the way to top. I have checked that I have not used any internal linking to top...

How to link code for button function to checkboxlist in C#?

c#,button,methods,checkboxlist,asp.net-4.5
I would like to link the function of my Chart Output Button to the items in my check box list such that when an item in the check box is selected or deselected, the page is reloaded again and my chart is refreshed. My codes to refresh the chart have...

One button with 2 actions

winforms,powershell,button,click,action
I did try to make 1 button that makes 2 actions: one on the 1st press (click), the other on the 2nd press (click), and repeat. However, none of my approaches worked for me, so I made 2nd button to make 2nd action, but I would really like to have...

Increase the clickable area of the button

android,button
I want to increase the clickable area of the button.But the image in the button should remain of same size.Also i have set image as a background not as source .How can i do that? <Button android:id="@+id/backbutton" android:layout_width="25dp" android:layout_height="25dp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginLeft="15dp" android:layout_marginTop="5dp" android:background="@drawable/arrow" android:paddingLeft="10dp" android:paddingRight="10dp" android:textColor="@color/title_gray"...

VB.NET Fading out button properly

vb.net,winforms,button,picturebox,fade
How do you fade out/in a button in VB.NET properly? I can fadeout/in labels using: Controls(i).ForeColor = Color.FromArgb(255, alpha, alpha, alpha) (where Controls(i) is a label from a For Next loop through all controls in Me.Controls; alpha is the value of the RGB, also from a For Next loop). This...

Get the position of a button clicked in ListView

java,android,listview,button,onclick
I have a fragment where when an item of the list is clicked, you can determine which position using onListItemClick. Now I have a button on each list item (a delete button) and I want to know which position was clicked when it is pressed. How can I do this?...

Contact button is described by CommunicateAction (schema.org), isn't it?

button,registration,contact,schema.org
I have a site for distance education. I have buttons (CSS) for contact and I want to describe it with schema.org with CommunicateAction (with itemprop="about"): <div itemscope itemtype="http://schema.org/CommunicateAction"> <a itemprop="url" href="contact.html" title="Contact us"> <span itemprop="about">Contact</span></a> </div> Is this right? Or is this option for other things? And - my buttons...

Bootstrap button and navigation bar not working

html,css,twitter-bootstrap,button,navigation
I'm a noob in this kind of thing, I don't understand what thing I'm doing wrong. I don't get a button nor a navigation bar; all I get is a small button that doesn't do absolutely nothing and is not with the color that I put in my CSS. My...

Button setOnClickListener method is not invoked

java,android,button,onclicklistener
The below is the sample code I'm trying to get the selected value from spinner on setOnClickListener method for the Button validateUser. public class MainActivity extends Activity implements AdapterView.OnItemSelectedListener { private Button validateUser; private Spinner userTypeSpinner; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); userTypeSpinner=(Spinner)findViewById(R.id.userTypeSpinner); validateUser= (Button) findViewById(R.id.userValidate);...

How to open in new tab using button

javascript,html,css,button,tabs
<script type="text/html" id="marketSelection"> <h3 class="choose-store">Choose your store:</h3> <div class="text-center"> <% _.each(suppliers, function (supplier) { %> <button class="btn-custom supermarket-item" data-id="<%= supplier.id %>"> <i></i><%= supplier.name %> </button> <% }) %> </div> /*File:src/js/data.js*/ var cookie_selectedSupermarket = CookieManager.retrieve('supplierId'), cookie_selectedPostalCode =...

Is there a name for this add / plus type of button in Android app development? If so, how can I add it to my application?

android,button,add
In many popular apps I have seen the type of button below (this one is from Google Keep's mobile app). The "add" button is very intuitive and I'd like to add it to an app I am working on. What is the name of this type of button? I am...

Dynamically change a button-drop list in javascript?

javascript,jquery,twitter-bootstrap,button,drop-down-menu
Trying to create a changeable button-drop-down from Bootstrap HTML in conjunction with Javascript. The HTML looks as: <div class="btn-group"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> Menu <span class="caret"></span> </a> <ul class="dropdown-menu"> <li><a href="#">Choice1</a></li> <li><a href="#">Choice2</a></li> <li><a href="#">Choice3</a></li> <li class="divider"></li> <li><a...

How to remove button border style?

button,styles,autohotkey
In autohotkey, how do you remove the black button border? I just want a button without any border on it. I've tried all these style modifiers to no avail. gui, add, button, hwndMyButton Control, Style, -0x0,, ahk_id %MyButton% ;remove BS_PUSHBUTTON Control, Style, -0x1,, ahk_id %MyButton% ;remove BS_DEFPUSHBUTTON Control, Style, +0x8000,,ahk_id...

Javascript: call dialog from button

javascript,button,dialog
I hope you can help me, because i'm new at javascript. I want to open a dialog by clicking on an button. When it shows up and you click "OK", there should pop-up a second dialog. http://forums.asp.net/t/1962249.aspx?Make+a+button+open+a+javascript+dialog And also on stackoverflow i saw related questions. But none of them could...

How do I get values dynamically from radio buttons?

jquery,button,radio
This is an on change event for anything changed on the page. $(this).change(function(){ type = $('input[name='+$(this).name+'radioName]:checked', '#myForm').val(); alert(type); }); I want to get the radio button that is clicked. So I can show the hidden input box when Profit is clicked. <TD align=left> <input type=radio name="Red" value="l" checked>Loss <input type=radio...

Unity - Gui Button issues (Android)

c#,android,button,unity3d
I'm fairly new to Unity and I am creating my first game for android as a bit of a play around. I have this game where you can use a boost by pressing a button. The player can pick up multiple boosts along the way. At the minute, I am...

How to get value of button inside the foreach loop using post method

php,html,button,foreach,html-form-post
Objective: Get the value of buttons from $_POST method, inside foreach loop $projects= 'Project1, Project2, Project3'//from mysql database $projectNames = explode(',', $projects); // to separate the project names to display one by one on button. Displaying all the project names on buttons. <?php foreach ($projectNames as $val):?> <form action="projectSelected.php" method="post"...

How do I use jQuery to redirect to variable URL?

jquery,variables,url,redirect,button
I'm trying to make a photo gallery for my portfolio. I've hit a wall and can't work out why this won't work: It's a button that sends you to a URL depending on your current URL. In this example, the user is at "/project1.html" and by clicking the next button,...

Java: Action Handler

java,button,event-handling
I am working on a problem for school and I am having an issue with the CalculateButtonHandler. I am also using an ExitButtonHandler but that is not giving me any issues. I have tried re-reading my textbook and have searched the web. After racking my brain over this issue I...

Is it possible to share multiple text by using share intent?

android,button,android-intent,share
I intend to share 6 text information, however it always shows the last information only, i.e. share.putExtra(Intent.EXTRA_TEXT, Contact); I also tried to use a string array to store all 6 information, i.e: share.putExtra(Intent.EXTRA_TEXT, stringArray); However, it still doesn't work. Can anyone help ? Thank you. My code: public class SingleJobActivity...

App crashing after pushing button, but the action is working

android,button,android-studio,compiler-errors
Maybe someone sees an error, the problem is that when i push btn2 (button 2) and btn3 (button 3) app crashes, but action still works, i.e video is running and PDF opens, while button 1 is working correctly... @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); configureImageButton(); mCamera = getCameraInstance();...

Change button background with an action

android,button,background
I have two activitys in the android application, the MainActivity and the SecondActicity. In the MainActivity i have one button which is lead to the second one. I have a background image on this button and i like to change that from the SecondActivity. There is a simple question in...

jquery validation plugin digits field and submit button not working

jquery,button,jquery-validate
I've a lot of problem with a simple plugin, jquery validation plugin: I need to set a form with 3 fields, the name (required) the email (required, email format), the phone (not required, number format of 11 digits). this is the html: <form class="form" id="contactusform"> <div class="row"> <div class="col-sm-4 form-label">...

How do you create a button that will display a random result from an array in javascript?

javascript,arrays,button,random,onclick
I've been trying to create a button that will take a random name from an array, and display it on an html page. Been trying for a long while to get this to work, with no results. What gives? As well, if you know the answer, how could I create...

Position JavaFX Button in a specific location

button,layout,javafx,position,location
My Question is how can i position a javafx button in a specific location. All the time that i tried to do this simple code is resulting that the Button is only located in the Center of the screen and not on my desired location. (I'm using StackPane) Code: Button...

javascript click button after be shure that page has completely loaded

javascript,button,window,document,onload
I have the website example.com and on this website is a button with the id "button1" and by clicking on this button, it opens an unknown url "example.com/unknownUrl" with the known button "buttonOnUnknownPage" on it. How can i be sure that the unknown page has finished loading and i can...

arange horizontal line of buttons in Pyside/PyQT/Qt

qt,button,layout,pyqt,pyside
I want to create a simple GUI with PySide/PyQt. In this GUI I want to have a raw with severeal push buttons and the length of the buttons I want to be proportional to its text label. Looking at QPushButton and QHBoxLayout I don't see a posibility this can be...

Dynamically grab form ID, turn off all buttons in parent form

javascript,jquery,button
I've succeeded in dynamically getting the form ID, but can't seem to turn off the buttons once one of them is clicked. I am trying to use the .prop to turn off the buttons. As people make choices by clicking on buttons, I want to disable the previous choices. Code:...

How can create a andorid Layout with two layout with ListView

android,android-layout,listview,button
I can not set properly for the andorid layout! On my code the listview It fills the screen. If I change the layout_height on the listview with a number not good for all resolutions! I use this code: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/background"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/FirstLinearLayout"...

PHP like button(counter) inside a table

php,html,mysql,button,like
I have a table made in php and inside that table I show some content from my database. I have created a simple button (similar to like) in every td and I want it to increase by 1 with every hit. Here is the line with the button : echo...

Having one button in ng-repeat change color when clicked, not all using Angularjs

javascript,html,angularjs,button
Hi I'm trying to make my done button change green when clicked. The first time I attempted this, it changed all the buttons green. index.html <tbody> <tr ng-repeat="plan in scheduler.plans | orderBy:'standardTime'"> <td class="plan-time">{{plan.displayTime}}</td> <td class="plan-duration">{{plan.duration}} minutes</td> <td class="plan-task">{{plan.task}}</td> <td><button type="button" ng-class="{'btn-primary': !scheduler.clicked, 'btn-success': scheduler.clicked}"...

Using CSS :after to shade a button:hover

css,css3,button
I'm trying to add a bunch of different color classes to my buttons and allow additional classes to be added arbitrarily. All of these should darken on hover. It seems tedious to write button.(color):hover rules for every single color, so I've written this such that the :after section gets darker...

Make a Button resource and use it in multiple places

c#,wpf,button,resources
how can i define a global button and use it in multiple places in WPF. here is my button witch i want to use it in multiple places. <Button x:Key="Attach" Width="90" Margin="220,0,0,0" Content="Attach" Height="16" FontSize="11"/> however i tried to define it in App.xaml(Application.Resources) and also in MainWindow.xaml (inside Window.Resources) But...

How to set cornerRadius to UIImage inside a Button?

ios,image,swift,button,cornerradius
I am creating Image with gradient, and i want the button to have cornerRadius button = UIButton.buttonWithType(UIButtonType.Custom) as! UIButton button.frame = CGRectMake(self.view.frame.size.width/2 - button.frame.size.width, 100, 250, 50) button.layer.cornerRadius = 3 button.setTitle("ViewThree", forState: UIControlState.Normal) button.addTarget(self, action: "ViewControllerAction:", forControlEvents: UIControlEvents.TouchUpInside) button.setBackgroundImage(getImageWithGradient(UIColor(netHex:0x2d72cf).CGColor, bottom:...

How to display button over a Ad Mediator in windows phone 8?

c#,xaml,button,windows-phone-8,canvas
I use in the application Ad Mediator. I need to add a button(see example) I tried to use the Canvas and Canvas.Zindex. But then does not display advertising. Please tell me how to do it....

Delphi Access Violation when moving button on form

delphi,button,access-violation
I am trying to move 2 buttons on the form using a while loop checking for the buttons left property, but I have an Access Violation. I am exeting the procedure with CreateThread() The code: procedure AnimButton1(); var ImageCount: integer; var b1, b2: integer; begin try while (b2 <> 187)...

Collection View Button Action (Cocoa, Xcode)

xcode,cocoa,button,collectionview
In XIB file I have a collection view which contains a button. In awake from Nib i have defined several of buttons with different images. So the application basically looks like a finder, but does not perform any actions yet. What I want to do now, is that when pressing...

Two checkbuttons to toggle sound not working right

python-2.7,button,tkinter
self.mb = Menubutton ( self.window2, text="Sound Toggler", relief=RAISED ) self.mb.grid(row=4, column = 0) self.mb.menu = Menu ( self.mb, tearoff = 0 ) self.mb["menu"] = self.mb.menu self.ONSound = IntVar() self.ONSound.set(1) self.OFFSound = IntVar() self.OFFSound.set(0) self.mb.menu.add_checkbutton ( label="ONSound", variable=self.ONSound, command = self.turnON(), onvalue=1,offvalue=0) self.mb.menu.add_checkbutton ( label="OFFSound", variable=self.OFFSound, command = self.turnOFF(), onvalue=1,offvalue=0)...

How to access file from another function

c#,wpf,button
I'm currently working on a C# WPF application which looks something like the following. What I am trying to do is this, the first button, when pressed, basically opens up a browse dialog box where you can select multiple files. I want access to those paths inside my other button...

In WPF how can I control whether another button clicked

c#,wpf,button,mouseevent
I want to determine another button is clicked in wpf. I wrote same code as below, when I clicked that button the animation works after that when I clicked same button the animation work like as else block. But I want to control if another button is clicked and than...

VBA - Possible to create a button that links to code?

excel,vba,excel-vba,button
I have written the code for a program that outputs three columns of information as well as printing the file name. I typically run the program with 20 files in the folder so I don't overwhelm things with too much info, given there are over 2000 files. Is it possible...

Update label's text when pressing a button in Kivy for Python

python,python-2.7,button,label,kivy
Here is my code: I want to make a game where the main_label changes text when you press a button but I've looked everywhere for a week and still don't understand how to do it. I looked on Kivy's website but I don't understand. As you can see I'm new...

font-awesome to be inserted in value=“”>

spring,button,input,font-awesome
im trying to insert some font-awesome inside here <form action="/someweb.html"> <input type="submit" class="btn btn-success" value="<spring:message text="View List"/>"> </form> but it seems that this code <i class="fa fa-list-ul fa-lg"></i> wont fit inside, and i tried to insert it inside in different position, i always get failed result. all i wanted is...

my done button somehow went to a blank page and delete won't work unless I refresh -ajax

javascript,php,jquery,ajax,button
I am playing around with a todo list I learned online. Trying to add ajax into it. Works well when I try to add an item. When an item is added there's a button says 'Mark as done' so I can click on it and then there will be a...

How to get an entry.bind and a button do the same thing?

python,button,tkinter,bind,entry
I think the name of the topic is pretty clear, I haven't found any answer elsewhere so I came to ask for it. I have a tkinter GUI with an entry and a validation button. I'd like to call the same function when I press a key in the entry,...

How to handle a Button Click in C# [closed]

c#,windows,events,button
I am making a windows application with C# and I can't seem to figure out how to create a Click event handler on a button. None of the examples I have seen work and I don't understand why. Can someone please show and explain how to handle button clicks in...

Use image Button with transparent color area

c#,button,png
I have a picture in PNG with transparent and normal color. I use this for one Button: this.Button1.BackColor = System.Drawing.Color.Transparent; this.Button1.BackgroundImage = Image; this.Button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.Button1.FlatAppearance.BorderSize = 0; this.Button1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; this.Button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; this.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;...

Python 3 tkinter button command inside different class

python,class,button,tkinter,def
I'm creating a Python (3.4.3) - tkinter program and am wondering whether it is possible to reference a def (self.get_details) from inside another class for a button's command. I haven't been able to find an answer to this problem anywhere, so I figured I'd just ask. Example: import tkinter as...

iOS: change background color using multiple buttons

ios,select,button,background
I am trying to change background color randomly as an effect overtime any of the buttons on the screen are tapped. I would like to control this effect with an On/Off UIButton. Tapping ChangeColorButton just logs “Off” never “On”. Not sure what to do? thanks everyone!! edited code so far!!...

How do I convert point to local coordinates?

c#,user-interface,button,unity3d
when a user taps a button I want the tap to be ignored if a transparent pixel is hit and the button beneath it should receive the tap instead. I can do this sort of behaviour in objective c within a few minutes, however, trying to do it in Unity...

Beginner:What do several parts of my code mean? [on hold]

java,android,button
Because I'm an absolute beginner I have a really simple question but I can't help myself.Maybe they are too simple because I can't find the answer in forums, books or other internet paged. I do not get the meaning of some parts of my java code because i just knew...

detect listItem from button click

android,listview,button,onclick,position
I have a listView with an adapter. Every item has two buttons, and i need to detect from which listItem the button was pressed. Here is my code: List<String> mList = new ArrayList<>(Arrays.asList(mNames)); ArrayAdapter<String> mAdapter = new ArrayAdapter<String>( getActivity(), R.layout.list_item_friends_new, R.id.friends_new_name, mList ){ @Override public View getView(int position, View convertView,...

Binding a button to both a function and close event wpf

c#,wpf,button,binding,command
I have a UserControl which is binded to a ViewModel class. I also have a class which contains a Command for closing a window. In my UserControl I have two buttons: Save and Cancel. My Cancel button is binded to the CloseWindow Command and when I click it, the UserControl...

How to Upload file onclick of button of type=button not type=submit in mvc4 using html begin form

file,asp.net-mvc-4,button,upload,submit
I have to upload a file using a button (of type button, not submit). And I want to show popup when no-file is selected and clicked on upload, it should not go to controller action. Can anyone help please?...

Going beyond the array in Android programming

java,android,arrays,button
I'm writing a game on Android platform. I have array of buttons and when I click in one of them, it will show up "X" on it and neighbouring buttons like this: X X X X X But when I click one of the border buttons application is stopping. This...

OnItemClickLisener does not work

android,listview,button,onitemclicklistener,listitem
i am trying to make list view with clickable items, and every list_item must consist 2 clickable buttons. But if i add buttons to item layout, iten click listener stops to work... here is my item_layout: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:gravity="center"> <RelativeLayout...

WPF : Custom Button

wpf,xaml,button,wpf-controls
I try to edit style in wpf like this : which allow the user design, like this but when i try to create my own style there is chrome layer not Template and I can not create my own button, I can only modify simple value like brush , .........

Multiple Alignments Inside Button

vb.net,button
Can you make a single string, within the same button, have different alignments? For example: dim String1 = "A B C D E F" A - would be in the top left corner B-in the middle top..... ...

Android align button to center and make sure they are evenly spaced out

android,xml,button,android-layout-weight
I got a Main Menu with four buttons (attached), I would like to align all buttons to the center (including the "Main Menu" textView), and I would like to make sure that each buttons are all evenly spaced out. I added android:gravity="center"> but its not aligning to center. Also...

How to tap / click at x,y position automatically?

android,button,automation,click
I have created one AlertDialog with OK and CANCEL button's in my application, when ever that alert dialog opened. i have to tap/click on OK button automatically without user interaction, i have x,y position of OK button. How to implement this please share with me, My main requirement is how...

How to change textView in separate ViewController from button in another ViewController?

ios,xcode,swift,button,uiviewcontroller
I have a Collections View that includes various cells that are also buttons. Upon clicking one of those buttons, a separate ViewController is shown (I just connected the button to the ViewController and clicked "show"). I would like to know how to switch the textView in that separate ViewController for...

JButton listener not firing

java,swing,button,actionlistener
I seperated my codes into MVC model and now my confirm button action listener is not printing the username and password even though I added a Actionlistener for it. please help thanks. Codes LoginDialog.java import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JDialog;...

Button Visibility in WPF at startup

c#,button,wpf-controls,visibility
I have some button that I want them to be hidden when the wpf loads up. I use this: public MainWindow() { mySendButton.Visibility = Visibility.Hidden; myReceiveButton.Visibility = Visibility.Hidden; InitializeComponent(); } But the above generating an error. i think I wrote them not at the right place. Can I get a...

CSS: Skew a buttons border, not the text

css,button,transition,effect,skew
I'm looking for an easy way with a single tag (just <a>)to create a skew effect on the borders, but keep the text the way it is. I would know how do with a span in- or outside, but I don't want to have additional, pretty much zero meaning HTML...