EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 11-27-2007, 05:02 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default Any Listbox insight?

Quote:
7.4 .15 Listbox
Parent : Widget
A list of items

DataSource

OnSelect - action
OnDoubleClick - action
String

SelectedItem - value of item
String

SelectedItemIndex - index of selected item
integer

Style
ListboxStyle

RowTemplate - describes a row
Template
Currently attempting to use a sort of listbox to act as selections that will change what is showing on a page. Wondering if this is possible to begin with, and if anyone has attempted it.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #2  
Unread 11-27-2007, 05:16 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Works pretty much like dropdowns and the like, so you can store any data you want in them and recall it via the OnSelect and OnDoubleClick events. The login/shutdown windows in my UI would be examples (selecting a row in the login window will populate text field in the window with the respective values).
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #3  
Unread 11-27-2007, 06:51 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Does the OnSelect action work? I can't seem to get it to do anything.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #4  
Unread 11-27-2007, 06:53 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Works for me, yes. Example code from the login window I mentioned (linebreaks added to make the events stand out):

Code:
<Listbox BackgroundColor="#FFFFFF" DataSource="CharacterData" Location="260,77" Margin="10,10,10,10" Name="CharacterSelect" 

OnDoubleClick="Parent.AutoplayChar.Text=SelectedItem.Name
Parent.AutoplayWorld.Text=SelectedItem.Server
Parent.Username.Text=SelectedItem.Username
Parent.Password.Text=SelectedItem.Password
Parent.ConnectButton.Press=true" 

OnSelect="Parent.AutoplayChar.Text=SelectedItem.Name
Parent.AutoplayWorld.Text=SelectedItem.Server
Parent.Username.Text=SelectedItem.Username
Parent.Password.Text=SelectedItem.Password" 

PackSize="a,a" RowTemplate="CharacterSelect_template" Size="234,221" Style="/CommonElements.Listbox.data.listbox_style" Tooltip="Click to select, double-click to login"/>
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #5  
Unread 11-27-2007, 07:37 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Apparently I was using a List and not a Listbox.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #6  
Unread 11-28-2007, 12:28 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Figured I'd share my simple findings in case anyone comes across this topic attempting to do the same thing.
I used this to be able to show different pages according to what was selected:
Code:
SELECTION=SelectedItem.Name
Parent.Parent.Parent.Text.Page1.visible=(SHOW ? True : False) SHOW=(Parent.Parent.Parent.Text.Page1.name == SELECTION)
Parent.Parent.Parent.Text.Page2.visible=(SHOW ? True : False) SHOW=(Parent.Parent.Parent.Text.Page2.name == SELECTION)
I've decided to just go another route, rather than try to come up with a new styled listbox. Plus, the listbox route was just kind of annoying me. It has it's uses however.

Another thing which I found annoying. I had to set the selectedrow to -1 (default) and have the first page set to visible. If I set the default row to the first one (zero), it would never show upon first opening. Just some extra useless info.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:07 AM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI