Thread: ListBox
View Single Post
  #18  
Unread 04-22-2005, 08:29 AM
Kosmos's Avatar
Kosmos Kosmos is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Lucan DLere
Posts: 581
Default

It is going to be a few days before I can get back at this.

I spent most of my days off messing around with this project, and I didn't make much headway toward an actual re-make of the window, BUT, I did learn alot more, and I am 99% sure I'll be able to finnish this and get it working the way I want.

Here's how I am going to do it if I can.

If you are following the project. I want to use ListBox function with a data Source for all the emotes. This makes it VERY easy for me to add or remove emotes, as well as sort them different ways.

Now doing that caused me two problems so far.

#1. No mouse over graphic for the ListBox and DropDown box. (Confirmed by Zonx)
#2 No text alignemntment function for the list box.

Over all the listbox just doesn't offer alot of functions.
But.. it does have what I need which is a n OnClick for each data item.

The remedy Part#1
Turning the tables. Zonx discovered how to use an invisible button to get the listbox working. IE moving the command string into the buttons OnPress event. Which worked like a charm.

So, what I did with the previous example is turn the tables. I layed a button over each item in the list box. Made the buttons select the data item on the list box directly underneath it.
This gets ride of the problem with no mouse over graphic.

The remendy Part#2 Problem is that I still don't have any real functions for the way Text is displayed in the list box, which is really annoying. No alignemtn features etc...

So I took a step back and played for a while and let my mind think about this problem.

This morning I woke up and the idea hit me like a ton of bricks.


Its a huge pain to keep the ListBox and buttons alighment proper.

So I decided to just make the list box invisible. Why do I need to see it?
I don't!

I'm going to use the list box data to load the buttons with text!!!

This gives me all the functions of the listbox, PLUS, all the visual goodness of the buttonstyles!

The buttons will be just blank templates. That the labels get loaded from the listbox!

Also, I'm going to try to figure out a way to take this a step further and make the a single button template, like on the 'StartMenu' and have the game create more buttons, according to the data in the data source.
__________________
Kosmos
Qeynos Ranger (Retired)
Lucan D'Lere
Reply With Quote