CEMETECH
Leading The Way To The Future
Login [Register]
Username:
Password:
Autologin:

Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 121 users online: 10 members, 88 guests and 23 bots.
Members: Ashbad, gbl08ma, HOMER-16, jesse, Link.
Bots: Spinn3r (3), Magpie Crawler (3), Googlebot (17).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
Author Message
techboy6601


Member


Joined: 31 Jan 2012
Posts: 124

Posted: 03 Nov 2012 12:12:46 am    Post subject: Simulating Listboxes

Hey all,

So I was working on a Notes app today for my 84+ when I discovered - to my great dismay - there are no listboxes in the DCS GUI libs!

Now, I really hope these get added in the future but until then I'm stuck with a few options.

Number 1 would be to use a GUIRTextMultiline and a GUIScrollVert to create a type of "simulated listbox". This approach has some problems, though:

    * The GUIRTextMultiline is editable, which allows for the user to mess things up
    * There is currently no way to associate a scroll bar with another object (according to the wiki)
    * Detecting clicks would be incredibly hard as you would also have to account for scrolling


The second approach would be to simply use a GUIMenu, which already simulates a listbox. Problems with this:

    *You lose the functionality of the main window which I would rather keep
    * I can not point each entry to a label as the notes are dynamic
    * If I point each to the same label, it would go to the same note every time because nothing is allowed to be changed (e.g. I can't set A to what note # I want the window to show, and I can't make it change individually because of reason #2



Well, it seems I'm stuck here. I hope you guys can enlighten me on some magic way or hidden function to to this.


Cheers!
_________________
My graphics card is a crayon box.





Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55732
Location: Earth, Sol, Milky Way

Posted: 03 Nov 2012 09:08:51 am    Post subject:

Well, the easiest thing would be to construct a list of all the strings you want, and use a scrollbar and a series of GUIRText and GUIRHotspot items to create a simulated list. When the hotspot for scrolling down fires, increment the offset to the first item you display. when the hotspot for scrolling up fires, decrement it. When one of the GUIRHotspots over the GUIRText fires, look up which note that corresponded to, and open it.
_________________


Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are GMT - 5 Hours

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.029874 seconds.