Close Button and other types of buttons

  • Thread starter Thread starter pairofstrings
  • Start date Start date
AI Thread Summary
Creating a close button for a window involves programming considerations that depend on the operating system and the graphics library used. A standard approach includes utilizing a graphics package that offers user interface components like buttons and input fields. This allows for programming a button with an 'Exit' action that can execute necessary clean-up tasks before closing the application, such as saving data or confirming closure with the user.The discussion emphasizes the importance of specifying the programming language and operating system to receive tailored assistance. While the placement of a button in the top right corner can be conceptualized, it is advised to avoid low-level coding that directly interacts with hardware specifics. Instead, using higher-level graphics utilities simplifies the process and minimizes potential issues. The conversation highlights the need for clarity in the coding level and the benefits of using double-buffering techniques to manage display updates effectively.
pairofstrings
Messages
411
Reaction score
7
TL;DR Summary
How to build buttons?
Hi.
Thanks for taking my question.
How to make screen display close button on a window?
Does it depend on display technology?
 
Technology news on Phys.org
Any window will have the little 'x' in the upper right corner, but unless you program some shut-down actions, it might leave things in a bad state.

You should use a graphics package that provides general utilities like toggle buttons, radio buttons, text placement, user typed input fields, etc. Then you can program a button as an 'Exit' action and have it trigger any clean-up actions before the program is killed. It should do things like close files, complete any pending operations, ask the user if he is sure he wants to close the program or save results, etc. Unfortunately, I am not up to date on the current graphics user interface packages for different operating systems.

You should specify what operating system and language you are working with if you want good help. If you are programming with Python, you might be interested in this.
 
pairofstrings said:
TL;DR Summary: How to build buttons?

Hi.
Thanks for taking my question.
How to make screen display close button on a window?
Does it depend on display technology?
Short on details.

Are you making a graphical program?
what operating system are you using, what GUI package for what language?
It shouldn't depend upon the display technology per se.
 
How to put a button on the top right corner without using any library? Can you describe hardware (display technology) mechanism with little pseudocode that puts a button right up there?
 
pairofstrings said:
How to put a button on the top right corner without using any library? Can you describe hardware (display technology) mechanism with little pseudocode that puts a button right up there?
You should probably be more specific about what level of code you are talking about. IMO, you should be careful not to use such low level code that you have to worry about the details of the specific monitor hardware. If you deal with the buffer in memory, that avoids a lot of hardware considerations. I recommend that you use a double-buffer option or strange things can happen in different situations. I have only dealt with relatively high level graphics utility software. Even the high level utilities should have the capability of drawing individual line segments. Working at that level would be more tedious.
 
  • Like
Likes Greg Bernhardt
Thread 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top