button

Creating a custom button in Java

Is there a way to make a JButton with your own button graphic not just with an image inside the button? If not is another way to create a custom button in java?...

How to make a button appear as if it is pressed?

Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button look "pressed"? Imagine this button is an on/off switch. ToolStripButton has the Checked property, but the regular Button does not....

What is the best way to draw skinnable "buttons" in a video game?

I'm looking for ideas on how to draw a skinnable "button" in a game application. If I use a fixed sprite non-vector image for the button background, then I can't size the button easily. If I write code to draw a resizable button (like Windows buttons are drawn), then the programmer has to get involved -- and it makes skinning difficult. ...

ASP.Net: why is my button's click/command events not binding/firing in a repeater?

Here's the code from the ascx that has the repeater: <asp:Repeater ID="ListOfEmails" runat="server" > <HeaderTemplate><h3>A sub-header:</h3></HeaderTemplate> <ItemTemplate> [Some other stuff is here] <asp:Button ID="removeEmail" runat="server" Text="X" ToolTip="remove" /> </ItemTemplate> </asp:Repeater> And in th...

Preventing accidental double clicking on a button

I have a few controls that inherit from ASP.NET buttons and use 'onserverclick'. If the user clicks twice, the button fires two server side events. How can I prevent this? I tried setting "this.disabled='true'" after the click (in the 'onclick' attribute) via javascript, but that blocks the first postback as well. ...

Mac OS X Java Swing Buttons are Disabled for no aparent reason

I wrote an application in Java and when it runs on one customer's computer running OS X The Save and Export buttons are disabled. (Everything else works in the application.) Both of these buttons open up a standard save file dialog. Any ideas? ...

Using WPF, what is the best method to update the background for a custom button control?

In WPF, we are creating custom controls that inherit from button with completely drawn-from-scratch xaml graphics. We have a border around the entire button xaml and we'd like to use that as the location for updating the background when MouseOver=True in a trigger. What we need to know is how do we update the background of the border i...

Is there use for the Scroll Lock button anymore?

The scroll lock button seems to be a reminder of the good old green terminal days. Does anyone still use it? Should the 101 button keyboard become the 100 button keyboard? ...

How to set/change/remove focus style on a Button in C#?

I have a couple of buttons of which I modified how they look. I have set them as flat buttons with a background and a custom border so they look all pretty and nothing like normal buttons anymore (actually, they look like Office 2003 buttons now ;-). The buttons have a border of one pixel. However when the button gets selected (gets the...

Winforms toolbar of buttons wrapping . .

I am dynamically added a bunch of buttons to a toolbar. I want the ability to programatically make it wrap onto a second row if the number of buttons exceeds the horizontal space in the current form. I dont want users to have to click the dropdown button to view more buttons as i need to ensure that all buttons are viewable always. ar...

Execute action for automatically unchecked button in Delphi

I have one action I want to perform when a TSpeedButton is pressed and another I want to perform when the same button is "unpressed". I know there's no onunpress event, but is there any easy way for me to get an action to execute when a different button is pressed? procedure ActionName.ActionNameExecute(Sender: TObject); begin Previ...

Custom button in C#: How to remove hover background?

Hi, I'm trying to do a custom button to my form (which has FormBorderStyle = none). I have my 3 states button images in an ImageList linked to the button. this.btnClose.AutoSize = false; this.btnClose.BackColor = System.Drawing.Color.Transparent; this.btnClose.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; this.btnClo...

Progress button for Windows Forms

.NET newbie here... I'd like to make a button in a Windows form that displays a progress or "cooldown" effect. That is, when the button is pressed, it becomes disabled. As some event or timer is progressing, the button shows the progress graphically. When the progress is finished, the graphic completes and the button becomes enabled. ...

Can I create transparent buttons in Visual Studio 2005 with C#

I have a user interface that requires placing some round buttons in a C# project with some data behind them. The buttons are System.Windows.Forms.buttons and I have used a GIF image with transparency to create them. However, the transparent areas aren't transparent. I've looked for references online but haven't found any suggestions fo...

How to make a Delphi TSpeedButton stay pressed if it's the only one in the group

I'm not sure why the TSpeedButton has this property but when a TSpeedButton is the only button of a given groupindex, it doesn't stay pressed, whether or not "AllowAllUp" is pressed. Maybe a Jedi control would suffice, but hopefully there's some fix. Any help or anecdotes are appreciated. BTW, I'm (still) using Delphi 7, not sure if t...

How do you add arguments to an ASP button PostBackUrl?

I am constructing a search page with a textbox and a button for now, and probably a dropdown to filter results later on. I have my button's PostBackUrl set to my search page (~/search.aspx). Is there an easy way to pass the value in the text box to the search page? ...

browser back button doesnt work in cached environment

The back button just causes my page to refresh. Is there a way around this without disabling the cache? ...

How to create a button with drop-down menu?

Is there a way to show IE/Firefox Back button style, dropdown menu button? ...

Javascript login form doesn't submit when user hits Enter

Hi there, I'm working on a simple javascript login for a site, and have come up with this: <form id="loginwindow"> <strong>Login to view!</strong> <p><strong>User ID:</strong> <input type="text" name="text2"> </p> <p><strong>Password:</strong> <input type="password" name="text1"><br> <input type="button" value="Check In" name="Sub...

YUI Menu positioned behind div

I have implemented a YUI split button with a menu. The button with menu appears in a scrolling div between header and a footer divs. When exposing the menu near the footer div, the menu appears behind the div. I have tried positioning the footer div with a z-index of -1. I have tried positioning the div (within the scrolling div) con...