button

Sonata Admin Action Button to Pre Filtered List

房东的猫 提交于 2020-01-23 07:54:10
问题 I am rather new to Symfony (2 weeks) so forgive my ignorance. I am trying to add a custom action button that will link to a pre filtered list of a RELATED entity. I have done a lot of research but can't quite seem to find what I need. Currently I have two entities Books and Authors with a manyToOne relation ship. I have these set up in Sonata Admin in the usual way and all works well. I even have an author filter on the book list page which I am hoping can be leveraged to accomplish my goal.

ImageButton that will AutoSize the image

冷暖自知 提交于 2020-01-23 03:36:13
问题 I'm searching for a button control that will AutoSize its image. Normal button controls won't do this. I'm using C#.Net 2.0. For example, I have a Button that is 200 x 50px and an image that is 800 x 100px. I want to resize the Image so that it is a little to the left, near the text of the button. With a PictureBox I can do this. But when I lay a PictureBox over the Button its very ugly because you can't click there. 回答1: You can do this as follows: button.Image = Image.FromFile(path); button

scene2d button scaling with libgdx

杀马特。学长 韩版系。学妹 提交于 2020-01-22 20:50:07
问题 I don't know if it is just me, but drawables confuse me. Are they intended to keep the size they are given, or is there a way to scale the image within them? I understand they can use ninepatch to fill certain areas by stretching an image, but I want to scale the image that it stretches. I am using a TextButton for my menu buttons, but they are way too big, and I would love to know how to scale them. I am retrieving the skin from an atlas, which has ninepatch images in it. Here is the

Dojo dialog close event on X (top-right)

左心房为你撑大大i 提交于 2020-01-22 17:45:06
问题 Im using Dojo to create a simple dialog to create a user in a system. The problem is I get the error: Tried to register widget with `id==user_submit` but that `id` is already registered user_submit , is a Dojo button I have to finish the form inside the dialog. When I close the dialog by clicking it and submitting the form there is no problem in opening the dialog again (in the click event on the button I have this line of code: dijit.byId("user_submit").destroy(); but if I close the dialog

Change the color of a disabled button in android

两盒软妹~` 提交于 2020-01-22 10:41:17
问题 Is there a way to change the color of a disabled button in android through styles or some other form ? I currently have the following, drawable/button_default.xml <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/button_default_shape"/> </selector> drawable/button_default_shape.xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape=

JAVA, SWT Local variable i defined in an enclosing scope must be final or effectively final

余生颓废 提交于 2020-01-22 03:34:05
问题 I'm trying to create an i*j number of buttons. On each button I want to add an mouseUp action, but I get an error. I tried to create a "Line" class to handle the listener event but failed. This is what I currently have: protected void createContents() { // Connect to prolog engine Query.hasSolution("use_module(library(jpl))"); // only because we call e.g. jpl_pl_syntax/1 below String t1 = "consult('dots_lines.pl')"; Query.hasSolution(t1); // Build GUI shell = new Shell(); shell.setSize(450,

How can I invoke multiple actions from a single form?

旧巷老猫 提交于 2020-01-21 18:59:06
问题 I have a jsp file in which I have a form. It shows data about an "account" data structure we have. There's a button to remove the data from that data structure. <form action="removeThisData.html" method="post"> ... blah blah blah ... <input type="submit" value="Remove"/> </form> Now, there's a component that I want to be editable. Basically, I want that third blah to be turned into a date. Here's what I wish I could do. <form action="removeThisData.html" method="post"> ... blah blah blah ...

Why does System.Windows.Controls.Button always have a padding of 10px?

最后都变了- 提交于 2020-01-21 12:20:53
问题 See screenshot. The bounding cyan-bordered box is the button, while the blue fill is the rectangle. I cannot for the life of me figure out how to get rid of the padding in the button. Is there a way to position the rectangle to the top left so it touches the cyan border? Thanks. 回答1: Did you try setting the Rectangle 's margin to 0 ? <Button x:Name="Button" BorderThickness="0" Margin="0" Padding="0" Width="96" Height="96"> <Rectangle Fill="Blue" Margin="0" Width="96" Height="96" /> </Button>

Using quotation marks in Javascript with innerHTML

偶尔善良 提交于 2020-01-21 11:50:07
问题 I have written some code to update the player on the story as it progresses. When the player clicks a button they are greeted with some new text and some more options. So far so good, but when I pass a function call in with a parameter attached, I need both single and double quote marks. However, if I use both then this breaks the innerHTML. Code is as follows (can post HTML too if need be): function buttonClicked(buttonid) { switch(buttonid) { case "YesStart": document.getElementById(

WPF image button control

眉间皱痕 提交于 2020-01-21 10:26:07
问题 Long time is now that I have been searching for a quality WPF image button control . I need the button to consist of an image only and let me set image options for hovering and pressing . All current solutions on SO and the rest of the web include CustomTemplate based solutions that are not very friendly (i.e. TriState Button). Maybe there is a set of controls like Modern UI or MahApps that someone could point me to that have this kind of button? 回答1: EDIT: This control can be reused