button

How to add a Facebook share box to a page?

你离开我真会死。 提交于 2020-01-03 01:15:18
问题 I saw many similar questions here but their answers don't work for me by some reasons. I need the share box, not the like one. Can anyone share a working solution? Thank you very much EDIT The only working way I found is to add a link like: <a href="http://www.facebook.com/sharer.php?u=http://www.mysite.com&t=Title" target="blank">Share on Facebook</a> But in this case there is no counter and I need it. Is there a way to do it now? 回答1: Ok, I found it here: http://www.simplebloggertutorials

Make Textview Visible by Pressing a Button

你说的曾经没有我的故事 提交于 2020-01-02 19:28:14
问题 I have my first class assignment in android app programming, hopefully you guys could help with this. I need to connect a code to a button so when I press it my textview will appear. In my XML-file I have <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/textView1" android:layout_alignParentBottom="true" android:layout_marginBottom="22dp" android:text="@string/ok_knappen" android:textColor="@color/button

Change UIBarButtonItem Icon after pressed iOS swift

家住魔仙堡 提交于 2020-01-02 17:25:22
问题 In the viewDidload method, I've declared a button and set RightBarButton... let btnFavourite = UIButton(frame: CGRectMake(0,0,30,30)) btnFavourite.addTarget(self, action: "btnFavourite:", forControlEvents: .TouchUpInside) btnFavourite.setImage(UIImage(named: "star"), forState: .Normal) btnFavourite.setImage(UIImage(named: "star_filled"), forState: .Highlighted) let rightButton = UIBarButtonItem(customView: btnFavourite) self.navigationItem.setRightBarButtonItems([rightButton], animated: true)

Can gtk menus displayed via gtk_menu_popup release focus?

回眸只為那壹抹淺笑 提交于 2020-01-02 16:22:24
问题 I'm refactoring some code that normally requires the user to click a button for a popup menu to appear (it appears beside the button), what I'm trying to do is show the popup menu if the user hovers the mouse over the button icon for a preset duration and hide it again if the user moves onto another button icon. However, activating the menu via gtk_menu_popup steals mouse and keyboard focus, I have made little progress trying to grab focus for the button widget. Is it possible to return focus

Button inside ListView not clickable

ぐ巨炮叔叔 提交于 2020-01-02 16:22:10
问题 I want to be able to click on a button inside an item of a ListView. It should have a different effect from clicking the whole item. I realize there are several questions asked on stackoverflow, but none of the suggestions works for me. The ListView is inside a Fragment. Layout of the fragment: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"

To increase a button's size when it is pressed in Android

寵の児 提交于 2020-01-02 14:30:11
问题 How can I make my button's size to increase slightly when it is pressed and decrease again when it is released? This is for highlighting the pressed button, by using size in addition to a different color. Regards, Kiki 回答1: Make your Button a field, and modify its size in the OnTouchListener associated with it. Using an OnTouchListener you can listen for different MotionEvents , such as ACTION_DOWN and ACTION_UP . 回答2: button.setOnTouchListener(new View.OnTouchListener() { @Override public

javafx make a grid of buttons

谁说胖子不能爱 提交于 2020-01-02 09:59:57
问题 I want to make a grid with a specific amount of buttons. I know how many buttons there are need to be because I get the number of rows and columns. I could do a loop, but I don't know how you can place buttons next to eachother and underneath. Secondly, the buttons need a Text and an Id, text is no problem, but how do you give them an id? And at last, and probably most difficult, it can occur that there are a lot of rows, so that a scrollbar should be available. At the end it should look

Remove space before left button on Navigation bar in IOS7?

最后都变了- 提交于 2020-01-02 09:53:48
问题 I can implement navigation bar and add left bar button, but before left button have space, please ask how to remove this space in ios 7. 回答1: use this it will work i have used it and works fine on iOS 7 also UIBarButtonItem *homeButton = [[UIBarButtonItem alloc] initWithCustomView:segmentView]; UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; negativeSpacer.width = -6;// it was -6 in iOS 6 you can

Remove space before left button on Navigation bar in IOS7?

☆樱花仙子☆ 提交于 2020-01-02 09:53:06
问题 I can implement navigation bar and add left bar button, but before left button have space, please ask how to remove this space in ios 7. 回答1: use this it will work i have used it and works fine on iOS 7 also UIBarButtonItem *homeButton = [[UIBarButtonItem alloc] initWithCustomView:segmentView]; UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; negativeSpacer.width = -6;// it was -6 in iOS 6 you can

How to embed a (working) Button in a Swing Table in Scala?

谁说胖子不能爱 提交于 2020-01-02 07:47:08
问题 I'm trying to use Scala/Swing to create a Table, one of whose columns is populated by Button s. My starting point is the SCells spreadsheet example from Odersky et al's book, and in particular the use of rendererComponent to control the Component appearing in each cell. Unfortunately, while this creates a button successfully, the button is not clickable. Here's a reasonably minimal and self-contained example: import swing._ import swing.event._ class TableButtons extends ScrollPane {