2022 Developer Survey is open! Take survey.

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.

Filter by
Sorted by
Tagged with
38 votes
5 answers
5k views

Easier user input in C++

A more proper version of this utility can be found at the following link here: Giveth me thy easier user input in C++ - follow up. I've always been a little bothered by the fact, that in order to get ...
user avatar
18 votes
0 answers
241 views

Progress Bar for Excel

Any future updates can be found at Excel-VBA-ProgressBar What I've been using so far For the last 6 years I've been using a progress form which I wrote in VBA using just Windows API calls. The code (...
user avatar
15 votes
1 answer
6k views

IBDesignable UICheckbox

A more up-to-date version of this control can be found on GitHub. One UI control that has always been mysteriously missing from Xcode's interface builder is some sort of checkbox. ...
user avatar
  • 25.2k
14 votes
2 answers
228 views

CommandBars, Buttons and Commands: Cleanup is on the menu

One of the biggest pain point in the entire rubberduck code base, is the way commandbar menus and menu items are created and wired up - something needs to be done to straighten that up, and while I ...
user avatar
12 votes
2 answers
653 views

English Draughts

The basic UI for my checkers app is complete, so the next step is to come here for review. I have not built my Facade over my F# game library, so some of the type usages are a little strange; this ...
user avatar
11 votes
3 answers
817 views

Efficiency of this constantly running time processor for an HTML5 video control bar

I built a custom HTML5 video control bar, and for each second, it updates two readings: Time Elapsed Time Remaining in hh:mm:ss notation, like so: Because of how often this function runs, I want it ...
user avatar
9 votes
2 answers
860 views

GUI for a quiz tool or game

I just started working on a little project to help me study for a course I'm taking. Is there anything I can do to improve code readability / bad practices? I had to remove most of the labels and ...
user avatar
7 votes
3 answers
3k views

Lemonade stand menu program

This is an assignment given in my C++ programming class. I have one main menu with four other menus branching out from it. I would like to make my code as clutter-free as I can, so please review ...
user avatar
  • 291
7 votes
2 answers
348 views

Heavily nested anonymous classes for Swing UIs

Oftentimes, I write small little dialogs or forms without a UI builder. I usually find myself having a lot of "container" panel variables that just float around. I found this leads to time-...
user avatar
  • 173
7 votes
1 answer
597 views

Implementation of Hangman in Java

Here's an implementation of Hangman that I've written that uses a basic GUI. As I am new to Java, please let me know of any improvements I can make to my coding style. Thanks for your help. ...
user avatar
7 votes
1 answer
162 views

DRY multiple if statements used to show/hide elements based on slider value

I'm showing and hiding 4 svg paths based on the value of a slider, all is working as expected, but it still feels a little cumbersome. Does anyone know a way to "DRY" it out a little more? jsFiddle <...
user avatar
  • 207
7 votes
1 answer
1k views

Button presses counter

I'm moving on to graphics, picking Pyglet and Cocos2D. This is my first program in Python with GUI. Introducing: Two distinct high definition button sprites Satisfying high quality button pressing ...
user avatar
6 votes
3 answers
592 views

Implementing a customized helpful hints function which includes docstring but much shorter than Python help()

When I show others how to use this module I have them make a PROJECT instance and then add other objects. ...
user avatar
  • 401
6 votes
2 answers
12k views

Multiple nested If checks in VBA

The below code is real and in use, but I've modified it to simplify the process/make it easier to explain. The purpose of this code is to combine data from multiple data sources. All sources are .xls ...
user avatar
  • 426
6 votes
2 answers
458 views

User Interface for Strategy Game

I've been working a strategy game for iOS for a little while, and each time I add functionality to the game model I'm finding myself building a lot of UI code to sync up with it. I believe that my ...
user avatar
  • 8,569
6 votes
2 answers
1k views

Testing quicksort user input

I am testing a quicksort implementation. Arrays of random size with random data are passed to quicksort and the return time is averaged out. The user is prompted to enter values for minimum length of ...
user avatar
  • 911
6 votes
2 answers
161 views

CommandBars, Buttons and Commands: Take 2

Following-up on CommandBars, Buttons and Commands: Cleanup is on the menu, I decided to try a more ambitious approach, as suggested in Nikita's answer. It works, but there are a number of "gotchas" ...
user avatar
6 votes
1 answer
1k views

Populating Day/Month Selections in UserForm Controls

So I have a simple userform where I require the User to input the target month, and the day to analyse data up to. This is just a small section of code to govern populating the month selection and ...
user avatar
  • 8,800
6 votes
1 answer
388 views

JavaScript discrete slider web component

The standard HTML range input element suffers from a number of limitations that caused me to implement the web component presented here. First, it is unnecessarily complicated to style the standard ...
user avatar
  • 245
6 votes
1 answer
2k views

UserForm to handle Date Inputs (Day,Month,Year)

Some fraction of a follow-up to The half-finished version. What's changed: Added year as well as Day/Month. Added input Validation. Implemented a poor man's ...
user avatar
  • 8,800
6 votes
1 answer
835 views

Interactive slider

Task: Create an interactive slider that allows the user to view a given image gallery. Slider controls: See previous slide See next slide Quick navigation through the images / Paging - ...
user avatar
  • 325
5 votes
3 answers
653 views

Digital root computation with benchmarking

I've read this question about computing the digital root of some integer, and wondered how it would look like in Python. As a reminder, "If you take the digits of any number and add them together, ...
user avatar
  • 639
5 votes
3 answers
13k views

Custom iOS chat interface design & functionality

Preamble So, as most of you have likely also noticed, chat components, at least at a basic level, are becoming very common with lots of apps. I found myself tweaking and redesigning the interface ...
user avatar
  • 303
5 votes
2 answers
153 views

TextBoxes for various number types

Is there a way I could somehow have all this classes condensed into one, while keeping the code as clean as possible? They are all doing essentially the same thing, just for the different number type....
user avatar
5 votes
1 answer
765 views

C++ line-editing micro-library

Working on a project, I've taken to adapting the linenoise line editing library for my own use, among other things, rewriting it using C++. The idea is to separate my changes and updates into a new ...
user avatar
5 votes
2 answers
11k views

Splitting the GUI into smaller classes

I am currently working on a course project and have been assigned to write a GUI. I've written it and it's about 2000 lines of code. It will be bigger when I add the SQL codes and new panels. So, I'...
user avatar
  • 53
5 votes
1 answer
182 views

Disable execution of parts of the code based on user's choice C++

I am working on the small program for data acquisition where the data is written to log file and the clients can listen to data broadcasted over socket. What I would like to achieve is to give the ...
user avatar
5 votes
1 answer
3k views

Class-based user input validation

Having contributed to this Community Wiki on StackOverflow regarding validating user input, I thought I'd finally sit down and write something more robust to do these kinds of tasks. I wanted ...
user avatar
  • 13.8k
5 votes
1 answer
305 views

Wrapper around a Python API for creating user interfaces

I am writing a wrapper around the GeUserArea class of Cinema 4D's Python API to enable creating user interfaces using an object orientated interface. I've already ...
user avatar
  • 223
5 votes
2 answers
129 views

Dropdown menu that opens on click using plain Javascript

I made a simple dropdown menu which opens when clicked, and closes when the user clicks anywhere outside the menu. The following is the codebase: ...
user avatar
  • 418
5 votes
1 answer
132 views

Swing "Number Guesser" program

I have made a UI that guesses the number that the user is thinking of(0 - 100), and I am wondering if it can be improved(I guess this is simple AI). I tried to shorten it as best I could, but it still ...
user avatar
5 votes
0 answers
8k views

Page and center UICollectionView like App Store

I need a collection view to page through cells and center it like the App Store, where a portion of the previous and next cells look like this: The native ...
user avatar
  • 73
5 votes
0 answers
2k views

Reducing complexity in NSView event handling code in Swift

My Cocoa event code always tends to descend into madness, I need to advice on how to reduce complexity. I've spend a few hours putting this example together. CanvasView is a layer hosting subclass of ...
user avatar
4 votes
3 answers
1k views

Swing GUI in Java

I'm learning Java at the moment and I'm currently trying to make a GUI using Swing. I've done some reading and people usually prefer and advice to use composition instead of inheritance of e.g. ...
user avatar
4 votes
2 answers
7k views

Removing a subview with a subview from a UIView without memory leaks

I made a custom UITextView for vertical Mongolian writing. It is made by subclassing UIView, which has a subview called ...
user avatar
  • 405
4 votes
3 answers
88 views

Textbased User Interface for user and program taking turns

I wrote this program to model interactions between a user and an artificial player, both playing by the same rules (not enforced here for simplicity). The game played is here is "your next word has to ...
user avatar
  • 409
4 votes
2 answers
281 views

TextField Validation for Teleport Feature in Game

I've implemented a teleport feature for my game and I would like some feedback on the way that I validate the user input. I am using the libGDX library. When the player clicks the Teleport Menu ...
user avatar
  • 8,569
4 votes
2 answers
126 views

PATM Generator GUI

I've been practising trying to write my code neater, so decided to build a practice GUI, the code works, However, how could I tidy this up in terms of separating out the different parts of the GUI, ...
user avatar
4 votes
2 answers
528 views

Python coin flipper with GUI

I am doing some simple projects in an attempt to get good at programming, this is my first GUI would love some feedback, and some guidelines. ...
user avatar
  • 107
4 votes
1 answer
151 views

Simple view for CRUD with miglayout

I have created the following view extending the JPanel class, the objective of this view is to allow the user to perform 3 CRUD operations create,delete and modify on the entity "Attribute", this ...
user avatar
4 votes
1 answer
461 views

Giveth me thy easier user input in C++ - follow up

I've decided to take some of the many suggestions for improvement on my previous question, Easier user input in C++, and actually get it to work as expected. This time around, a few things are ...
user avatar
4 votes
1 answer
682 views

GUI layout for a security camera app

I'm designing a security camera program. Right now, I am just trying to set up the GUI before receiving. I am using Kivy since, in the future, I plan on designing some programs for Android. I really ...
user avatar
  • 41
4 votes
1 answer
137 views

A small PHP library for styling terminal output

I've attempted to make a small PHP library for styling terminal output using ANSI escape sequences. The repo is located here. To be honest, I am not really satisfied with the current structure of my ...
user avatar
4 votes
1 answer
4k views

Onclick radio buttons to change background color

We are displaying two radio buttons in page. Click on Radio buttons, it will change background color. Is there any way to improve the quality of the code? ...
user avatar
4 votes
1 answer
458 views

Checkbox multiselect user interface

I wrote a small multiple select interface in jQuery, and I'm looking for any feedback on code quality/usability. It has to do the following: When check all is checked, all boxes must become checked ...
user avatar
  • 2,034
4 votes
1 answer
358 views

Java/Swing GUI code/layout, am I doing this wrong?

I've never done Java GUI's before. After much trouble I've gotten my GUI to look how I want, however it feels as if my code is very inefficient, as if I'm going about this the wrong way? ...
user avatar
4 votes
0 answers
52 views

Small Automatic Differentiation Library

Introduction As a programming exercise I recently wrote this automatic differentiation library based on forward accumulation. It should offer a simple way to create mathematical functions whose ...
user avatar
  • 41
4 votes
0 answers
218 views

Implementing a TTY loading / waiting animation

I implemented a class to animate waiting for processes: ...
user avatar
4 votes
0 answers
3k views

Creating Android layout with GridLayout

I'm trying to create a Layout with two columns which are next to each other (I'm accomplishing this behavior with a LinearLayout). Inside each column, I have two TextViews and two Buttons, which I ...
user avatar
  • 143
3 votes
2 answers
15k 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 ...
user avatar
  • 911