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!
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.
  
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
Page 1 of 1
» All times are UTC - 5 Hours
 
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

 

Advertisement