PDA

View Full Version : CoreRPG - Windowlist - Changing width of columns



Jacklifear
October 16th, 2015, 09:12
REFERENCE PICTURE:
https://puu.sh/kM5D1/5c4bbe73cf.jpg

I am creating a faction system for Earthdawn, and I'm converting the CoreRPG "Towns" extension to make my needs work. This is in reference to the NPC column that I have been toying with.

In this case, it allows for NPC drag and drops fill the first column on the left with the NPC name. The problem is the average size of the NPC name in my listing is much larger than the initial width.

My goals are one of two things.
1. Find a way to put the NPC name into the second column by default upon dropping an NPC in there. This way I can simply extend the width of the window and have it fit fine
2. Find a way to implement the "width" of the first column to be wider.

The methods I've tried so far involve the <columns><width> method that doesn't seem to work (Even with <fullwidth />) and attempting to find out how to use the setColumnWidth, but the resources I've found are limited or from a time before it was implemented.

Could someone give me some suggestions to nail this small thing out?

Moon Wizard
October 16th, 2015, 13:29
Does this help for the setColumnWidth function?
https://www.fantasygrounds.com/refdoc/windowlist.xcp#setColumnWidth

The windows will auto-size to fit the controls within, but the windowlist control will not auto-size to fit the child windows. I'm guessing you would need to query the width of each name tag within each child NPC window (stringcontrol.getSize), and then use the windowlist.setColumnWidth function.

Regards,
JPG