button

multiple buttons in one line of code in tkinter

给你一囗甜甜゛ 提交于 2020-02-04 05:35:14
问题 I need to create 200 check buttons in Tkinter, as I'm creating a seat selection screen. Is there a way of creating all of these buttons without having to type them out line by line, like you can in pygame? so far I've tried this but it doesn't seem to work. (I am not a super smart coder so it may be a silly mistake). root = tk.Tk() frame1 = tk.Frame(root) frame1.pack(side=tk.TOP, fill=tk.X) button = list() for i in range(4): button.append(tk.Button(frame1, image=karirano, command=partial(klik

Xamarin Forms Button OnClick

余生颓废 提交于 2020-02-02 11:37:55
问题 I currently have a ContentPage.cs in my project, using Xamarin Forms as work environment, and I was just wondering if I could be able to add an OnClick for the button that is at the end of the code. Any help is very appreciated. Thanks in advanced. using System; using Xamarin.Forms; namespace DebuggerTestAndroidIOS { public class VSParameters : ContentPage { public VSParameters () { Content = new StackLayout { Children = { new StackLayout { BackgroundColor = Color.FromHex("0ADF80"), Children

Xamarin Forms Button OnClick

假如想象 提交于 2020-02-02 11:37:07
问题 I currently have a ContentPage.cs in my project, using Xamarin Forms as work environment, and I was just wondering if I could be able to add an OnClick for the button that is at the end of the code. Any help is very appreciated. Thanks in advanced. using System; using Xamarin.Forms; namespace DebuggerTestAndroidIOS { public class VSParameters : ContentPage { public VSParameters () { Content = new StackLayout { Children = { new StackLayout { BackgroundColor = Color.FromHex("0ADF80"), Children

No way to color the border of a Tkinter Button?

岁酱吖の 提交于 2020-02-02 04:06:26
问题 It works with some other widgets, but not with Buttons. from Tkinter import * root = Tk() root.geometry("600x300+400+50") btn_up = Button(root, text='Go UP') btn_up.config(highlightbackground="red", highlightcolor="red", highlightthickness=10, relief=SOLID) btn_up.pack() root.mainloop() Python 2.7 - Windows 10 回答1: I am using linux and when I run your code, I get a button with a thick red border, so it looks like that the default Windows theme does not support highlightthickness while the

How to assign an Array element to a tkinter button via for each loop?

99封情书 提交于 2020-01-30 11:09:46
问题 I am building a basic GUI and I want to be able to assign each item in my array to a button. The buttons are created via a foreach loop. I am trying to make the button display its respective letter on click. Originally, I thought simply adding a "command" attribute to the button would create the association I needed. This only prints a list of all of letters. I don't want it print every letter, but simply print whichever letter of the button I click Below is my current code. alphabet = ["A",

How to add a command button in VBA?

爷,独闯天下 提交于 2020-01-29 13:23:09
问题 I am trying to add a button to an Excel workbook so that it shows up in every sheet. A great answer to my original question gave me a macro to create the buttons on each sheet: Sub AddButtons() Dim ws As Excel.Worksheet Dim btn As Button For Each ws In ThisWorkbook.Worksheets Set btn = ws.Buttons.Add(X, Y, W, H) [set btn properties] Next ws End Sub I am now having trouble with setting the button properties so that the button prints the sheet when pressed. Again here is my print macro: Dim WS

Attempting to add a button but getting “[object HTMLInputElement]” instead of the button

痴心易碎 提交于 2020-01-26 04:35:06
问题 I'm trying to build buttons dynamically in a for loop where each iteration builds a button. I've done this before no problem and copied this code from an old project. Now I get [object HTMLInputElement] posted to the DOM instead of my button. Any advice? Thanks. What I have so far: var element = document.createElement("input"); element.className = 'appointmentClass' element.id = countAppointments; element.type = 'button'; element.name = 'name'; element.value = 'remove'; element.onclick =

Button no longer does what it is supposed to do

我是研究僧i 提交于 2020-01-26 04:34:08
问题 I have a button that is meant to swap from one activity to another which use to work but ever since i added the coding for another button to call for zxing's scanning feature the button no longer does anything at all. This is my MainActivity.java for those who are willing to help package com.example.mdpmk1; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.view.View; import android.view.View.OnClickListener; import android.widget.TextView;

How can I enable the button in kivy which is disabled before?

試著忘記壹切 提交于 2020-01-25 16:37:08
问题 : canvas: Color: rgb: 1, 1, 1 Rectangle: source: "bbbg.png" size: self.size BoxLayout: orientation: 'vertical' Button: #pos_hint: {'center': .01} #size_hint_x: 1 #size_hint_y: 0.07 #size_hint_x: 0.07 disabled:True pos_hint: {'center': 0} background_color: 1,1,1,0 on_release: root.manager.current = 'select_next' on_press: app.nextbtn(self) source: None name:"" Image: size: 540, 540 center: self.parent.center allow_stretch: True source: "playbutton.png" 回答1: Get a reference to the button, and

How can I enable the button in kivy which is disabled before?

假装没事ソ 提交于 2020-01-25 16:36:47
问题 : canvas: Color: rgb: 1, 1, 1 Rectangle: source: "bbbg.png" size: self.size BoxLayout: orientation: 'vertical' Button: #pos_hint: {'center': .01} #size_hint_x: 1 #size_hint_y: 0.07 #size_hint_x: 0.07 disabled:True pos_hint: {'center': 0} background_color: 1,1,1,0 on_release: root.manager.current = 'select_next' on_press: app.nextbtn(self) source: None name:"" Image: size: 540, 540 center: self.parent.center allow_stretch: True source: "playbutton.png" 回答1: Get a reference to the button, and