Button without focus?
#1
Beginner here! I'm modding a skin and currently I'm editing the details row (under the clearlogo) as shown in the picture.
Image
The MPAA part was originally in a group control with image and label controls to display the MPAA text and flag box. This is also in a group list with the rest of the details row.

But in order to have the texture width scale with the label (instead of being a set width within the group list and a truncated label), I changed this group to a button control instead because as I understand it, this is the only way you can have the texture scale with the label (or so I've read). 

My code appears to work fine for the homescreen, dynamic texture according to the label width, all adjusting dynamically in the details row. But this same details row group list is also included in other windows, and in these windows the button control I created is actually acting like a button. As soon as I switch to another window that also includes the details row, the focus is stuck on the button rather then on the widgets it should normally be focused on.

Is there something I can add to prevent the button from being focused on?

My code is as follows:

 
xml:
<include name="MPAA_Details_Row">

<include>Default_Visible_Fade</include>
<control type="button">
<visible>!String.IsEmpty(ListItem.Mpaa)</visible>
<posy>5</posy>
<height>38</height>
<width>auto</width>
<align>center</align>
<aligny>top</aligny>
<textwidth>140</textwidth>
<textcolor>silver</textcolor>
<texturenofocus colordiffuse="ff424242">bingie/square-rounded.png</texturenofocus>
<texturefocus colordiffuse="ff424242">bingie/square-rounded.png</texturefocus>
<textoffsetx>15</textoffsetx>
<textoffsety>1</textoffsety>
<font>Reg26</font>
<label>$VAR[GetMPAA]</label>
</control>

Edit: I fixed it with <enable>false</enable>
Reply
#2
You haven't given it an ID so that might be a problem.
Reply
#3
(2020-09-24, 19:16)Hitcher Wrote: You haven't given it an ID so that might be a problem.

Thanks for the response! I tried with a random ID and it didn't do anything unfortunately. I'm not sure I've explained the issue properly.  I actually don't want this button control to act like a button, I just want it to act like a label and not be focusable.
Reply
#4
Well it's somehow getting focus. Does this mean you can't control other windows?
Reply
#5
(2020-09-24, 22:51)Hitcher Wrote: Well it's somehow getting focus. Does this mean you can't control other windows?

Yes, it leaves me stuck on the button with only back button working to return home unless I specify an onclick, onup, ondown etc. Anyway, no matter, looks like I found what I needed from the wiki. There's an <enable> tag I didn't know about.  Setting this to false worked perfectly.

Thanks for your time and help :-)
Reply

Logout Mark Read Team Forum Stats Members Help
Button without focus?0