EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   Listbox fill? (https://www.eq2interface.com/forums/showthread.php?t=11448)

Drumstix42 08-08-2008 03:59 AM

Listbox fill?
 
I'm not quite looking to reverse the order of how a listbox is filled but rather align it to the bottom of the listbox size.

Basically, I'm wanting to align the listbox to the bottom in the VoiceChat window, so that when you resize the window the names stay at the bottom of the window. I've had no luck doing it yet. The rows are by a template of pages that have nothing about them that I can figure out to change to make them align to the bottom, rather than the top.


Hope that's kinda clear....
Right now I'm messing with dynamically changing the location of the "Speakers" page so that the top of the page will change when Hovering out of the window, so that it will "appear" the speakers align to the bottom. But even with that it's a bit rough with the scroll bar being present and all. ScrollExtent comes into play, and it just gets ugly from there :(

Drumstix42 08-08-2008 04:19 AM

2 Attachment(s)
I managed to get what I want, as far as I've tested so far. I attached the XML file if anyone is interested and there isn't an easier way.

My OnHoverOut on the main page of VoiceChat window:
Code:

bUseSize=(Speakers.Players.Size==Speakers.Players.ScrollExtent)
iRowNum=(VoiceUserCount.localtext) * (17)
iTotalHeight=height
iSubtract=(iTotalHeight-iRowNum)
iCorrectHeight=(bUseSize) ? (iSubtract) : (48)
Speakers.location=('3' ## ',' ## 'iCorrectHeight')

I wanted to make sure not to mess around with it if the scrollbar was present (not tested really). Also, my window is modded a bit. So this isn't dealing with default window locations.
I made a VoiceUserCount text object using the DynamicData of how many people are in the chat, to do some math.

I'd still like to know if there is any XML change to accomplish what I ask above, so that this isn't so sloppy!

ObsidianDragon 08-08-2008 12:10 PM

I was just trying to find a way to do the same thing. I'm using the upside down voice users by Ke'la (it has the channel dropdown at bottom). Looking in the uibuilder reference I saw there was an Align Back for composites, but apparently not for listboxes (I am a complete and utter noob at this, usually all I've been able to do is hack chunks of well written code to make more complex chunks of kludgy code).

It's really cool what you managed to do there, but I too would love to see if there is some secret bottom-filling style for the listbox, also so the sort could then sort bottom up.

Landiin 08-08-2008 12:54 PM

I don't even know of a listbox control that does this. I know such fucntion isn't supported by the win API either so I doubt there is this functionality in the UI.

Drumstix42 08-08-2008 03:27 PM

Ah well. I updated the xml and code above to show my final result. I just had to change it for when the scrollbar was present. My code was a bit off ;)

It works nicely and doesn't look too shabby overall. I'll probably change it to have the dropdown menu located at the bottom as well. But I'll do that when I release the window for download.

ObsidianDragon 08-08-2008 04:27 PM

Good! I look forward to taking advantage of your labor :)

If only there were a way to push listbox type gamedata into a volume fill window, like with the effects windows

Drumstix42 10-07-2008 01:51 AM

I'm still messing with this thing, trying to get it be more "automatic" and have been having no luck.

The listbox uses a template file (eq2ui_voice_template.xml). I'm trying to get perhaps an OnShow property put into the template file to mess with the rest of the UI... or in this case the VoiceChat window.

Anyone have any ideas on how about trying to this, or if it's possible at all? I tried a few Parent.Parent.x.x.x.x combinations without any luck.


All times are GMT -5. The time now is 03:55 AM.

vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI