Close Button and other types of buttons

  • Thread starter pairofstrings
  • Start date
  • #1
pairofstrings
411
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
  • #2
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.
 
  • #3
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.
 
  • #4
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?
 
  • #5
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

Similar threads

  • Programming and Computer Science
Replies
1
Views
492
  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
1
Views
456
  • Programming and Computer Science
Replies
11
Views
2K
  • Programming and Computer Science
Replies
14
Views
2K
  • Programming and Computer Science
Replies
11
Views
1K
  • Programming and Computer Science
Replies
5
Views
1K
  • Programming and Computer Science
2
Replies
45
Views
3K
  • Programming and Computer Science
Replies
9
Views
2K
  • Programming and Computer Science
Replies
1
Views
1K
Back
Top