Questions tagged [user-interface]
The part of the application that users directly interact with. Use this tag for reviews of code that defines how an application's user interface works and looks.
143 questions
3
votes
2
answers
16k
views
Making sure user inputs correct type
I have two functions that are used to prompt and recieve input from the user. One is for int and the other is for boolean. They ...
3
votes
2
answers
1k
views
Is my Python tkinter application properly structured?
I started a simple OOP GUI project with tkinter in Python since I've been studying the basics for a while, but I'm not sure if my code is properly structured and following the programming conventions. ...
3
votes
2
answers
6k
views
Custom UI - Seeing which control has focus
I'm trying to make a simple UI to better understand how interfaces and the System.Windows.Forms Controls behave.
Like the above namespace, I will be able to get ...
3
votes
2
answers
215
views
Truncating/abbreviating strings in the middle with an ellipsis (…) (or other) separators with a fixed character limit
Problem
For some user-facing string, I want to truncate it to some given maximum length (also useful for file name/path lengths on Windows etc.). However, I want to do it a little more elaborately ...
3
votes
2
answers
73
views
UI code for save editor
I'm wondering what I could do to improve the function that handles initializing the UI. I think it looks disgusting. Any ideas on what I could do besides splitting the code up into multiple functions ...
3
votes
2
answers
118
views
Single page site with navigation bar
I've made a simple one page site to practise using Bootstrap. Could you please look at the HTML & CSS and check for possible improvements?
Here's a page.
HTML
...
3
votes
1
answer
3k
views
Set a font for a UITextView if the font is nil or not equal to desired font
Main question
I am setting a font for a UITextView that is a subview in a custom view. I only set it if the user didn't specify the font size in the Interface Builder.
I have the following working ...
3
votes
1
answer
694
views
HMSegmentedControl react to tapping on currently selected segment
I'm using HMSegmentedControl, an open-source UISegmentedControl subclass. I'm trying to react to the user tapping on the currently selected segment. HMSegmentedControl only supports reacting to a ...
3
votes
3
answers
173
views
Handler for a control to pan a map in four directions
I have a pan control that look like this:
Pretty standard Google Mapsish controls, IMO.
When the user clicks in the top 3rd of the control, it should pan up (deltaY = +1); right third means it ...
3
votes
1
answer
82
views
user_interface module
As writing code to handle error-checked input or to present functions to execute to the user is boring and error-prone, I wrote a module to automate these tasks:
...
3
votes
1
answer
10k
views
Account-creation program
I just finished a program that is a simple Swing GUI. It takes in user info, such as password and username, turns them into strings, and puts them in a text file called nuserInfo.txt.
I just want ...
3
votes
1
answer
154
views
Newspaper Bill Calculator CLI with Python (2 of 3, CLI)
Code is posted after explanation.
Due to the size of the project, this is being posted in three separate posts. This also ensures each post is more focused.
Post 1 of 3, Core: Newspaper Bill ...
3
votes
1
answer
373
views
Filling A Linked List With Data From File And Handling User Status Messages
I have completed an university assignment on C. While the code is fully functional based on the specifications of the exercise, I like high-quality code and would like to ask for opinions on how can ...
3
votes
1
answer
168
views
Plain Page Flip Effect
I've created a very plain version of page flip onscroll. I made it to look like turning the pages of a book.
It looks OK on browsers I have (Firefox 52.9, Chrome 49, IE8). Though the effect doesn't ...
3
votes
1
answer
129
views
Simple React component to view cached data and test result from API
This is only the front end side of things which I have at the moment, as the back end is still being worked on. But as this is my first attempt at a react component, I'd like to know if there is ...
3
votes
1
answer
3k
views
Multi-line input reader
I wrote two functions to read multi-line user input.
...
3
votes
1
answer
148
views
JavaScript/HTML web application - user interface logic
I am writing a JavaScript/HTML driven web application. For the user interface, I am not completely sure that my JavaScript is 'OK'. Mainly, I switch between "modes" by assigning a placeholder variable ...
3
votes
1
answer
2k
views
wxPython Form Builder - Sizer Automation
Presented for critique are a pair of classes which automate Sizer Creation and Layout in wxPython.
...
3
votes
1
answer
237
views
Responsive Navigation with hamburger menu
This script creates a hamburger menu when the window is resized. It will also create a sticky navigation when the window is scrolled down, which will also create a hamburger menu when the window is ...
3
votes
1
answer
355
views
Make roads contrast with Google Maps
EDIT: I turned down the brightness on my monitor using the graphics options for the video card. This solved the issue. How this setting changed is a mystery...
I am leaving this up because googling it ...
3
votes
1
answer
314
views
Javascript Slider that controls TinySlider - feels inefficient [closed]
I feel like the main point of inefficiency is how I create "notches" and must loop through all of the created notches every time the value for the slider is changed.
...
3
votes
1
answer
4k
views
FCC: Product Landing Page - HTML & CSS only
I have created a product landing page for a freeCodeCamp responsive web design project which requires me to create a "Product Landing Page".
Requirements to keep in mind:
...
3
votes
1
answer
57
views
Front end for system ordering
I am developing a microservice that enables business partners to order systems for common customers:
...
3
votes
1
answer
100
views
Find matching image and metadata files, pull data and rename both
My Original - Read date from a file and rename two files using the date
github if you want to see behind the scenes.
I like taking pictures of birds. Lots of pictures of birds. My camera
counts ...
3
votes
1
answer
2k
views
Keeping UI responsive while performing long running task
I recently asked for some advice on the best way to structure my code for a program I was writing. (see this question on Programmers.SE). The solution I was given was quite elegant, however I am less ...
3
votes
0
answers
629
views
Maintaining a complicated installer supporting per-user and everyone
Another challenge for developing rubberduck VBA project is to develop an installer that support per-user mode and everyone-mode.
Normally with an MSI package, one has a bootstrapper so it is possible ...
3
votes
0
answers
60
views
Reusable, manipulatable plots
I'm interested in mimicking a simple version of Mathematica's Manipulate function in javascript. This is my first project in javascript, but I was hoping to make a library that I can use to quickly ...
3
votes
0
answers
166
views
Adding swipe support to multiple classes
I have implemented swipe functionality using UIPanGestureRecognizer in a project.
What I have done is added PanGesture to ...
3
votes
1
answer
551
views
Text-based menu to manipulate a database text file
I am making a program that lets a user manipulate a database (a text file).
In the code I am posting, I show only 2 of the menu choices, namely "createdb" and "deletedb", and a few functions I made ...
3
votes
0
answers
83
views
Multiple select widget in CoffeeScript
I created a widget to handle multiple selections in CoffeeScript. There's a working attached snippet that uses the compiled JavaScript (Stack Snippets don't support CoffeeScript), which is available ...
3
votes
0
answers
3k
views
File input control with rounded buttons and styled textbox
We have orange rounded buttons as a standard on our site. For our purposes, we switched everything over to use an anchor tag, instead of input type=button. The exception to this was the File Upload ...
2
votes
1
answer
319
views
Table View Controller class in Swift
My TableView consists of four cells (for blacklisting categories) with a boolean property (indicated with a checkmark) and another cell with a UISwitch embedded in ...
2
votes
2
answers
86
views
OOP, FP and IMP condensed in Rock, Paper and Scissors
Rock Paper and Scissors is a pretty basic program.
The reason I wrote this program is because I wanted to see what a small script that used all of the main programming paradigms looked like.
My code ...
2
votes
1
answer
14k
views
Toggle-item inside a Bootstrap dropdown-menu
I have this working code for a toggle-item inside a Bootstrap dropdown-menu. See demo here.
I suspect that it should be possible to improve it :
in order to have a shorter code and avoid all the <...
2
votes
2
answers
110
views
Javascript convert number string to Boolean
I'm making this control toggle between hide and show base on the value in this hidden value. I wanted to use a Boolean because I ...
2
votes
1
answer
187
views
How to properly write code for Java Swing
basically I'm learning Java Swing by myself and I'm wondering what is the correct way to wrote code for it?
I don't want to have a big class with everything in it and I want to do in the most "correct"...
2
votes
1
answer
658
views
Creating an empty Sudoku grid
I am generating a 9x9 grid on which I will play sudoku later by setting click listeners to each square on the grid.
I first have a .xml file that represents a single square in the grid. This consists ...
2
votes
3
answers
358
views
Google homepage beginner project
I was hoping to get some feedback on my basic recreation of the google homepage. Im doing the Odin Project learning course and this was the first project trying to use the basics of HTML/CSS
HTML ...
2
votes
1
answer
5k
views
Monoalphabetic Cipher in Java With GUI
An easy, terribly written but working, Caeasar (Monoalphabetic) cipher implementation, with a GUI (Graphical User Interface).
Cipher.java
...
2
votes
1
answer
88
views
User-friendly script for searching through log files
A BASH script that ask users simple questions and greps the syslog archive files (plain-text and gzipped).
The script is fully working; I am looking for advices on:
Coding style
Possible ...
2
votes
1
answer
2k
views
VBA UI design architecture, how to make this a piece of art
I have this very recurrent pattern at my VBA macros, where I have to ask the user to give me certain information that will be necessary for the processes to come. Most often for example, I need him to ...
2
votes
1
answer
17k
views
Setting constraints for dynamic views in iOS
I have an app which uses Stack Views to update its UI depending on the number of pigs. For example below, 1 pig and 4 pigs.
I set up Stack Views in Storyboard and set isHidden to true based on how ...
2
votes
1
answer
12k
views
Correct Implementation of Custom UIView into ViewController Programatically
I am familiar with using storyboards to construct UI elements in Xcode, but I am only beginning to learn how to make UI programmatically (without a storyboard).
I wanted to know if this is the ...
2
votes
1
answer
38
views
Isolating testable portions in rendered html, without imposing on content or formatting
I'm unit testing some webpages and I'm trying to figure out how to best isolate the portions that need to be tested. There are two goals: Don't impose on the webpage's content or format, and be as ...
2
votes
1
answer
30k
views
Populate dropdown B on selection in dropdown A
On selection from drop-down A (HTML select) I need to populate another "sub"-dropdown with a different list of values. For instance, on selection of country in ...
2
votes
1
answer
111
views
How to manage array of states effectively?
I have a working code to have 2 search bars with dropdown suggestions, selectable by both mouse and arrow keys in TypeScript and Fresh/Preact. In there I have to explicitly declare individual hooks ...
2
votes
1
answer
119
views
Read database from IO context and update UI from Main context in Kotlin
Still a bit new to Kotlin and coroutines, so I want to learn best practices. The following code seems to work as expected in it's original context, though the naming has been tweaked here. The list of ...
2
votes
1
answer
413
views
Infinite Slider Conversion to Prototype
I've found the following example of an infinite slider to use on a project but as I will have multiple instances I have converted it to a prototype.
The original example
https://medium.com/@...
2
votes
1
answer
45
views
Validating initial inputs then a joint validation test
The code works as intended but I believe it is very inefficient. The calculation of weights is simple, but I imagine this would be silly, for example, a 100 asset portfolio. The first problem is that ...
2
votes
2
answers
142
views
responsive login page (html/css only) [closed]
I'm working on a responsive login page (open source). Could you try to review a bit the code on Github ?
...