user-interface

Changing image on Android thread

江枫思渺然 提交于 2021-01-28 10:07:41
问题 I've gone through stackoverflow and all the similar answers - but have found them not of use. Can anyone please point out why this is not working? It should be simple: update the image every 6 seconds (will be every 3 mins but for testing I've put it as 6 seconds). What the code does is - goes through each of the 4 images step by step but does not change the image. HOWEVER when it gets to the last image - it does change it(??). Questions: What's wrong with this? Why would it only update the

python or pythonw in creating a cross-platform standalone GUI app

自古美人都是妖i 提交于 2021-01-28 09:04:27
问题 I am developing a simple standalone, graphical application in python. My development has been done on linux but I would like to distribute the application cross-platform. I have a launcher script which checks a bunch of environment variables and then sets various configuration options, and then calls the application with what amounts to python main.py (specifically os.system('python main.py %s'% (arg1, arg2...)) ) On OS X (without X11), the launcher script crashed with an error like Could not

ttk Menu wont unpost

痞子三分冷 提交于 2021-01-28 08:37:48
问题 I wanted to make a simple pop-up message that shows the name of the options represented as icons when the mouse enters them and hide when it leavs. This icons are images within buttons, and I have been able to show the message when entering the button using a Menu widget, but when the mouse leaves the button it dose NOT unpost, unless there's a klick. I tryed deleting the cascade, but the same happens, the difference is that he menu at that moment has no text. I tryed to .destroy() the menu

Python - How do I add a theme from ttkthemes package to a guizero application?

给你一囗甜甜゛ 提交于 2021-01-28 08:12:44
问题 I'm working on multiple guizero projects and I'm trying to add a theme from the Python package ttkthemes (arc to be exact). I have tried to add the theme to the app widget with the following code: from guizero import App, Text, PushButton from ttkthemes import ThemedStyle import tkinter.ttk as ttk app = App(title="App") style = ThemedStyle(app) style.set_theme("arc") text = Text(app, text="Text") button = PushButton(app, text="Button") app.display() And it doesn't show the theme This is what

WPF DataContext updated but UI not updated

牧云@^-^@ 提交于 2021-01-28 07:36:20
问题 I have maximum simple app. I want to fill listbox when button pressed. I use binding, window DataContext is updated after some operation, but UI not updated! Here is the code: MainWindow.xaml <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <Button Content="Button" HorizontalAlignment="Left" Margin="432,288.04,0,0"

Python: Scroll a ScrolledText automatically to the end if the user is not scrolling manually

孤者浪人 提交于 2021-01-28 06:20:45
问题 I made my ScrolledText scroll automatically to the end, based on this answer. Now I'd like to scroll automatically only if the user is not scrolling manually . I was looking for something like this: self.text.offsetBottom (see my comment in the code below) , but couldn't find it yet. Any ideas? Thanks! import time from Tkinter import * import ScrolledText class Example(Frame): def __init__(self, *args, **kwargs): Frame.__init__(self, *args, **kwargs) self.text = ScrolledText.ScrolledText(self

Material UI Grid List Rows with a big awkward gap

不问归期 提交于 2021-01-28 05:49:15
问题 I am using Material UI with Reactjs. I have issues with the Grid List Component. I am trying to have a grid - 1000x1000px so I specified the height and width in the custom gridList style as 1000 and 1000 respectively as in the documentation. There should be 10 columns and each cell should have a height of 100px. Problem comes when I have more than 1 row in the grid list. There is too big a gap between the row elements. I tried to override the CSS styles but none of them work nicely. I would

Move textfield up when keyboard appears in Flutter

此生再无相见时 提交于 2021-01-28 05:40:43
问题 I want to make my textfield go up when the keyboard appears. The keyboard is in front of textfield so I can't see what I write, I didn't found many solution to my problem or there were not very clean. Widget build(BuildContext context) { return Scaffold( backgroundColor: Theme.of(context).backgroundColor, body: Padding( padding: const EdgeInsets.all(8.0), child: Column( children: <Widget>[ conseil(text), Spacer(), InkWell( onTap: () => [ pic.getImage().then((a) { setState(() { myimg = myimage

How can I get TK buttons, generated by a for loop, to pass input to their command? (Python)

岁酱吖の 提交于 2021-01-28 05:36:40
问题 I have a program which dynamically generates a GUI. I don't know how many buttons I will have, if any at all. The specific problem is something like this: for varname in self.filetextboxes: if self.varDict[varname]=='': self.varDict[varname] = (StringVar(),) self.varDict[varname][0].set('') fileButton = Button(self, text=" ", command = lambda:self.varDict[varname][0].set(tkFileDialog.askopenfilename()), image=self.filephoto) ftb = Entry(self, textvariable = self.varDict[varname][0],width=40

How to make my user-interface self adapt to the show and hide of JPanel?

本秂侑毒 提交于 2021-01-28 05:13:40
问题 Recently I'm writing a mail system client using Java (I chose swing to write the GUI and use IDEA to hardcode my GUI). In the Compose module, I want to show or hide the textfield for CC and Bcc when I click the corresponding buttons. So I googled and browsed the following questions and doc on the web: How to make JPanel scrollable in Java? How to make JPanel scrollable? Scrolling a JPanel Doc: JScrollPane Finally, I chose the JScrollPane to implement it. My simplified sample code is as