PDA

View Full Version : Field Tab Order and next line issue



MadBeardMan
March 22nd, 2020, 22:24
Evening Folks,

I've added to the Traveller 2E ruleset Starships and it's working nicely at the moment, but one thing I have I'd like to solve if possible.

When you enter the ships details, ie Hull, Weapons, Sensors etc, these all have 'Name, Detail, Tons and Cost', as the final 3 are all aligned to the right hand side so when edit is enabled the delete and reorder buttons appear.

32407

To get it working I had to use the 'tabtarget' settings, but what it does when you're on the last field (Cost) and you Tab it goes back to the 'Name' on the same line, is it possible to get Tab on the final field to go to the 1st field of the next line?

This is my sheetdata:


<basicstring name="cost">
<anchored>
<top offset="2" />
<right parent="rightanchor" anchor="left" relation="relative" offset="-5" />
<size width="60" height="20" />
</anchored>
<hideonvalue>0</hideonvalue>
<tabtarget prev="tons" next="name" />
</basicstring>
<basicstring name="tons">
<anchored>
<top offset="2" />
<right parent="rightanchor" anchor="left" relation="relative" offset="-8" />
<size width="50" height="20" />
</anchored>
<hideonvalue>0</hideonvalue>
<center />
<tabtarget prev="details" next="cost" />
</basicstring>
<basicstringnoborder name="name">
<bounds>5,2,90,20</bounds>
</basicstringnoborder>
<basicstring name="detail">
<anchored>
<top offset="2" />
<right parent="tons" anchor="left" offset="-8" />
<left parent="name" anchor="right" offset="8" />
<size height="20" />
</anchored>
<tabtarget prev="name" next="tons" />
</basicstring>

I hope you can, I found if you leave out next='name' then it goes backwards.

So open to ideas here.

Cheers,
MBM

Moon Wizard
March 22nd, 2020, 23:28
Every control needs to have a next/prev; and you need to leave off for the first/last fields. Make sure every string/number field is defined with tabtargets.

Regards,
JPG

MadBeardMan
March 23rd, 2020, 00:10
Hi Chap,

So there's no way to press TAB on Cost and then get it move down to the next line? I've removed the prev/next on the first/last and it loops around on the same line.

Cheers,
MBM

Moon Wizard
March 23rd, 2020, 00:11
No, there's no command to do that. To use the built-in tab ordering, you have to complete specify the tab-ordering within a window; or it follows the default definition order.

Regards,
JPG

MadBeardMan
March 23rd, 2020, 00:12
Ok thanks once again, I'll leave it as it is now.

Cheers,
MBM