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 : 100+ GUI elements?
Author | Message | ||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9066 |
Hi all. Is there any way to add more then 100 GUI elements? I have just about used them all up, and I am only about half way through writing the code. As the code is entirely menu driven(11 GUI pages so far), deleting ANY defined GUI elements is a recipe for disaster, as the code will promptly fall over when it tries to display a page with elements that have been deleted or something of a nightmare to debug if elements are being re-used across different pages. Anyone got any ideas? Increasing the number of available GUI elements would be the best solution. I don't suppose there is a MMBASIC memory address I can POKE to increase this number is there? Probably not, but you never know unless you ask. Smoke makes things work. When the smoke gets out, it stops! |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8592 |
Grogster: I'll back you on this one. Geoff, can this limit be increased in 5.3 please? |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
Increasing the table size will consume more RAM but it should be not drastic. What is the consensus? Would 200 entries be enough? The best answer would be to make the table size dynamic but that would be a lot more complex. Geoff Geoff Graham - http://geoffg.net |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
Geoff, IMHO if you make it fixed (as you did previously), then for some people this will be fine, but for others then they will need more (Damned-if-you-do, damed-if-you-don't scenario!!). So dynamic is definitely 'best', but at the overhead of more work at your end! I must admit I also ran out of GUIs in the early days when trying to do 'tabbed menus'. Some things really are best left for the user to decide. . . . For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1664 |
Regards dynamic table size, Would OPTION GUI ELEMENTS 150 etc be feasible? User could then specify a size around what they require. Phil |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9066 |
I like Phil's idea, but weather that is doable is something only Geoff and Peter would know. I have re-sorted my elements, and now have about 30-odd spare ones I did not have yesterday. I changed my GUI elements to use strings for the captions instead of pre-defined text when setting up the pages, then I can set the text to what I want with the CTRLVAL= command just before I call that page. That has allowed me to free up all the captions that were in the same place on a page, but different messages, so that one GUI CAPTION element(or set of) does ALL of those messages, just by changing the string it uses before calling the page that shows that caption. So, this is a learning experience for me too - learning how to deal with GUI elements is new to me, but I am enjoying the process so far, and once you get a handle on GUI INTERRUPT and how to layout the controls on the screen, MMBASIC doing all the GUI management in the background makes writing the actual code to do the useful stuff almost a pleasure in it's simplicity. Smoke makes things work. When the smoke gets out, it stops! |
||||
Phil23 Guru Joined: 27/03/2016 Location: AustraliaPosts: 1664 |
IF it is doable, it would be great if OPTION LIST could return something like this:- GUI ELEMENTS 60/100, but I understand that would be increasing complexity. Phil. |
||||
Print this page |