The underline is fairly easy (do you REALLY want a solid line there?) you can add a leader to the tab for a dotted line, or for fancier effects make a custom underline, store it as a character style, and apply the character style to the tab as a nested style in your TOC listing's paragraph style.
The leading numbers are a little more complex, I suspect. These are the chapter number? I don't see an easy way to include the Chapter number (assigned in the Section and numbering dialog), or even a Section Marker (in my test, that just said Section in the TOC instead of listing the value). You could use a section prefix as part of the page number, but hten it would appear on the pages, too. perhaps that's not a problem?
You might be able to script the chapter number, though...
Yes, I really want a solid line but a dotted line wouldn't be bad either. Again, this line would be from where the title ends and before the page number begins. I can make the entire thing underlined but that just looks bad. I have been searching through the paragraph styles and character styles and cannot fine where the setting is. I guess I just don't undersand your explanation, I must not know enough about this program than I thought I did.
As far as the chapter identifier goes, the page numbers are listed at the bottom as "3-45" or "7-12" but in the TOC they just apear as 45 or 12.
Lets start with the numbers. How is th echapter number making it onto the document pages? is it a section prefix entered into the Numbering & Section dialog, or something else? A section prefix included in the page number should find its way into the TOC without doing anything special at all.
Now for the underline. Any character can be underlined. Just select it and go to Underline Options and turn it on. In this case what you are trying to do is apply that underline to all the tabs, and there are actually two ways to do this automatically, but both require you to create a character style that is nothing more than turning on the underline and setting a weight, stroke type and offset for it. You can use a solid line, dashed, dotted, etc., for this custom underline which means you can get pretty much any look you want.
The first method is to simply apply the style to the tab in the TOC dialog -- you have the opprotunity to apply a character style to whatever you've entered into the "Between Entry and Number" field by choosing a style in the next field to the right (you need to have the additional options showing). This will push that underline tight up against the text on both ends, though, and I like a little bit of breathing space, so I use the second method.
In my method you add some space on either side of your tab (thin space, sixth space, your choice) in the field, and do not apply a style there. Instead, create a paragraph style for the lisitngs (which you should do anyway), then add a nested style like this: None up to 1 tab (or right indent tab, if you've used that) character, your new underline style through 1 character. This leaves the spaces on either side without the underline as well as the listing text and numbers. You can, of course, add another character style at the end to change the numbers, too, if you like, for example to bold or italic. I use this method to make forms for printing with lines where people need to write something. Adjusting the tabs adjusts the length of the lines.
Thank you so much! That works perfectly. I don't think I ever would have found this out on my own. I'm now using the prefix for my page numbering and the character styles to get my underline.