Dynamically reposition a text box?

K

keith brickey

I need to display a list as text boxes in a repeating table. This is a
hierarchical list, and I have an attribute in the xml that represents a
level of indentation. Is it possible to dynamically change the position
(horizontally) of a text box in response to a user action, such as clicking
a button? (The button action would also update the indent attribute in the
underlying data).

Thanks,

Keith
 
A

Andrew Watt [MVP - InfoPath]

I need to display a list as text boxes in a repeating table. This is a
hierarchical list, and I have an attribute in the xml that represents a
level of indentation. Is it possible to dynamically change the position
(horizontally) of a text box in response to a user action, such as clicking
a button? (The button action would also update the indent attribute in the
underlying data).

Thanks,

Keith

Keith,

You are determined to try to get this working, aren't you? :)

OK ... I had wondered about a way of doing it using hand editing of
XSLT ... but the following way *might* work. NOT elegant, but it might
work.

Suppose you have a button which you click and you have TWO text boxes
for every one you want to the user to see.

Clicking the button affects the conditional formatting so that the
non-indented text box is hidden and indented text box becomes visible.

To the user this *appears* as indenting but it's really conditional
formatting.

I haven't thought this through in detail but it's an idea for you to
explore.

Andrew Watt
MVP - InfoPath
 
M

Matthew Blain \(Serriform\)

You can probably do this with custom XSL which just does something like
print out a number of spacers (or better, sets the padding-left) based on
the indent depth.

e.g. <span style="padding-left:{indent * 10}">

Then you need 2 buttons, which programmatically change indent.

You can also use a query (count ancestors) to find the depth of the XML, but
it seems like you've got the indent inside a flat list now.

--Matthew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top