Jump to content

[FM22] Help with table columns alignment/ size


BuzzR
 Share

Recommended Posts

Hi.

I am trying to modify the layout of the players in / out tables in the following news item..

spacer.png

This news item is controlled by : panels\news_item_panels\pre season report team preview panel.xml  where we can find at the end :

<container class="transfer_panel_club" file="club/club transfer in out tables panel">
			<record id="object_property">
				<integer id="get_property" value="Tcrf" />
				<integer id="set_property" value="objt" />
			</record>
		</container>

So we can edit club/club transfer in out tables panel like this

<panel>
	<layout class="stick_to_sides_attachment" alignment="all" inset="0" apply_to_children="true" />
	<container id="inou">
		<layout class="arrange_horizontal_attachment" layout="-1,-1" offset="0" gap="4" />
		<layout class="stick_to_sides_attachment" alignment="vertical" inset="0" apply_to_children="true" />

		<container class="main_box" id="inbx" navigation_container="true">
			<translation id="text" translation_id="420572" type="use" value="Players In[COMMENT: competition preview panel, transfers section showing arrivals to a league or team]" />
			<layout class="stick_to_sides_attachment" alignment="all" apply_to_children="true" inset="0"  />

			<widget class="table" id="trin" save_session_state="true" mode="fill_rows, stripe_rows, printable, keyboard, show_bullets, select_rows, select_multiple, dont_ask_for_focus"  wants_lazy_load="true" auto_size_rows="true" get_row_data_event="utit" row_height="28"  navigation_container="true">
				<!-- default properties adopted by every item in table -->
				<record id="default_properties">
					<flags id="alignment" value="left,centre_y" />
				</record>
			</widget>
		</container>

		<container class="main_box" id="oubx" navigation_container="true">
			<translation id="text" translation_id="420573" type="use" value="Players Out[COMMENT: competition preview panel, transfers section showing departures from a league or team]" />
			<layout class="stick_to_sides_attachment" alignment="all" apply_to_children="true" inset="0" />

			<widget class="table" id="trou" save_session_state="true" mode="fill_rows, stripe_rows, printable, keyboard, show_bullets, select_rows, select_multiple, dont_ask_for_focus" wants_lazy_load="true" auto_size_rows="true" get_row_data_event="utot" row_height="28"  navigation_container="true">
				<!-- default properties adopted by every item in table -->
				<record id="default_properties">
					<flags id="alignment" value="left,centre_y" />
				</record>
			</widget>
		</container>
	</container>
</panel>

And the new layout it's like this :

spacer.png

Almost happy - :herman: .

How can we expand the columns to fill the table space ?

Any idea will be appreciated.

Thank you.

 

 

 

club transfer in out tables panel.xml

Edited by BuzzR
Changed uploaded file.
Link to post
Share on other sites

This has to be one of the most horrible, frustrating, nerves and time consuming experience of my ( short ) skinning career.

I could not find the table class definition ( as I was trying to alter default columns properties ) - if exists somewhere in the myriad of folders and .xmls I do not care anymore. 

Sometimes it feels like there is no order or consistency with this game.

The same class="table" definition is used in other panels where you can define layout="" for columns. For some reason it doesn't work in this god forsaken panel for this petty, ugly and annoying little news item.

So before I went crazy - I gave up and set up a tabbed container.

spacer.png

If anyone wants it .. find the xml attached. 

 

 

club transfer in out tables panel.xml

Edited by BuzzR
spelling
Link to post
Share on other sites

19 minutes ago, Watson156 said:

I like it. What main panels folder does it go in?

The news panel is panels\news_item_panels\pre season report team preview panel.xml  and it uses club/club transfer in out tables panel.xml  for the players in and out section.

 

 

 

Link to post
Share on other sites

I feel your pain.  I want to edit the colour of text in the tables, but cannot find a consistent way to do it.  It seems to require a different approach on almost every damn panel I come across!

I don't know how possible the following would be, but one suggestion is whether it would be possible to move the head coach and media prediction across to the left, move the tactics up, and then have the space below to expand into.  A hastily mocked up version using paint:

b235fb2979c0098fc666a3e6638f5466.thumb.png.77bc99cb88f27a959690b09323d6bcba.png

Link to post
Share on other sites

9 minutes ago, GIMN said:

I feel your pain.  I want to edit the colour of text in the tables, but cannot find a consistent way to do it.  It seems to require a different approach on almost every damn panel I come across!

I don't know how possible the following would be, but one suggestion is whether it would be possible to move the head coach and media prediction across to the left, move the tactics up, and then have the space below to expand into.  A hastily mocked up version using paint:

b235fb2979c0098fc666a3e6638f5466.thumb.png.77bc99cb88f27a959690b09323d6bcba.png

Thank you for support. 

I'm going to leave it with tabbed container and that's it. Not going to touch tables for a while now... :lol:

Link to post
Share on other sites

2 hours ago, bluestillidie00 said:

Been making skins for six years, you can find my posts from late fm15-early fm16. 

my advice, don’t touch tables. I don’t get them, no one does. They’re weird and arbitrary and in most cases, hardcoded

I imagine devs lurking around this forum, laughing maniacally any time questions about tables comes up.  It's like a small little reminder to the skinning community that they still hold the power.

(Just for clarity, this is meant entirely in jest)

Link to post
Share on other sites

2 hours ago, GIMN said:

I imagine devs lurking around this forum, laughing maniacally any time questions about tables comes up.  It's like a small little reminder to the skinning community that they still hold the power.

(Just for clarity, this is meant entirely in jest)

look at these peasants, trying to align something to the right 

Link to post
Share on other sites

If you want to recolour the text in a table then this code works ~90% of the time:

<list id="column_widget_properties">
<record>
<integer id="index" value="0" />
<string id="colour" value="text" />
</record>
</list>

0 is the column, and goes 0, 1, 2...

And text is the colour you want setting.

Link to post
Share on other sites

1 hour ago, michaeltmurrayuk said:

If you want to recolour the text in a table then this code works ~90% of the time:

<list id="column_widget_properties">
<record>
<integer id="index" value="0" />
<string id="colour" value="text" />
</record>
</list>

0 is the column, and goes 0, 1, 2...

And text is the colour you want setting.

That's good to know.  I tend to try the following first:

<list id="column_widget_properties">
	<record indx="0" spec="text" colour="text"/>
</list>

And if that fails, I then start adding in just colour="text" to random places in the blind hope that it might work.  It rarely does.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...