Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:39 28 Jun 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : gui items like check boxes etc

Author Message
tenij000
Newbie

Joined: 30/05/2025
Location: Netherlands
Posts: 22
Posted: 12:32am 24 Jun 2025
Copy link to clipboard 
Print this post

those check boxes or switch other gui items i have to do that option somthing but says it is perament does that mean can only set 1 time the amount of switches check boxes etc
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2566
Posted: 02:07am 24 Jun 2025
Copy link to clipboard 
Print this post

Most permanent options can be changed by first removing them with:-

OPTION xxx DISABLE

Then entering the revised option.

There are a few that can changed by just entering the revised option.

The Advanced Graphics PDF doesn't say which method so just try it.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3281
Posted: 03:31am 24 Jun 2025
Copy link to clipboard 
Print this post

  tenij000 said  those check boxes or switch other gui items i have to do that option somthing but says it is perament does that mean can only set 1 time the amount of switches check boxes etc

In short, YES.

You only define a GUI control once (preferably at the start of the program) and then it appears on the screen and will be managed by MMBasic.  The user can then touch it to turn it off/on, etc and you can read its control property in your program to determine what the user has done.

You can also remove the GUI control but it is best left there for the duration of your program.  You can also hide and restore GUI controls.  Read the Advanced Graphics PDF as it has a detailed description of how to use this feature.

Geoff
Geoff Graham - http://geoffg.net
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6262
Posted: 05:18am 24 Jun 2025
Copy link to clipboard 
Print this post

I think he is referring to
OPTION GUI CONTROLS nnn

You can change to number of controls but not within a program.
Changing the number of GUI controls causes memory to be reallocated.

A good start is to set the number of controls to 39 which reserves 2k bytes.
Setting 40 will double the allocated memory.

Jim
VK7JH
MMedit
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2566
Posted: 05:35am 24 Jun 2025
Copy link to clipboard 
Print this post

  Quote  You can change to number of controls but not within a program.
Changing the number of GUI controls causes memory to be reallocated.

A good start is to set the number of controls to 39 which reserves 2k bytes.
Setting 40 will double the allocated memory.
That would be useful in the Advanced Graphics PDF.

  Advanced Graphics PDF said  Options, Commands and Functions
Detailed Listing
Options
Permanent? <- appears to suggest some ambiguity at the time of writing
OPTION GUI CONTROLS NbrOfGUIControls
 Specifies the maximum number of GUI controls that can be defined.
Each control uses 52 bytes and the total memory used must be rounded up
to the next 2048 byte multiple. For example, specifying 70 controls will
use 4KB of RAM.
By default the number of GUI controls is set to zero so this option must
be used before any GUI controls are defined.
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3281
Posted: 06:57pm 24 Jun 2025
Copy link to clipboard 
Print this post

On Page 1 of the manual the option is described quite clearly:
  Quote  To use the GUI controls the memory required for the GUI controls must be allocated first by using the command OPTION GUI CONTROLS.  Typically you would use the command like this:  
OPTION GUI CONTROLS 75
This will set the maximum number of controls that you can define to 75.  This option is permanent (i.e. it will be remembered on power down).  By default the maximum number of controls is set to zero and in this case the GUI features will not be available and no memory will be used.


Geoff
Geoff Graham - http://geoffg.net
 
tenij000
Newbie

Joined: 30/05/2025
Location: Netherlands
Posts: 22
Posted: 08:44pm 24 Jun 2025
Copy link to clipboard 
Print this post

OPTION GUI CONTROLS 39
GUI TEXTBOX 13, 20, 30, 150, 30, RGB(255,255,255), RGB(0,0,0)
CtrlVal(13) ="hello"


is also a way to disable 1 if needid

GUI TEXTBOX 13 <<<<

then change it for example into somthing else like checkbox
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6262
Posted: 09:54pm 24 Jun 2025
Copy link to clipboard 
Print this post

Please read the Advanced Graphics Functions.pdf
You have
GUI HIDE
GUI SHOW
GUI DISABLE
GUI ENABLE
GUI DELETE

Unless you are running short of memory, there is no need to DELETE
VK7JH
MMedit
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025