These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Fake tabulated forms/button background colour

PetafromOz
Registered: Jun 8 2009
Posts: 230
Answered

I'm trying to create a form that looks as though it has Tabs along the top. I assume the only way I can do that is to create buttons (in this case 4) that look like tabs and format those and the adjoining fields below so that it looks like it's a paper form with tabs.

A visual example of what I mean can be seen in the LiveCycle Help menu under 'Captions > Showing in Table Rows'.

First of all, if anyone has a better idea of how I can set this up, I'd love to hear it.

Secondly, I'm trying to set each button (tab) up such that when people click on them, the background changes colour. I can't see anything in the object palette that enables me to do anything other than set it to change text colour - not background colour.

Script-wise, I tried to set it up as a 'click' or a 'mouse-up' event, but I can't see what value to set for a button.

This is what I've got so far, but it doesn't work...

if(this.rawValue == 1)
{
this.fillColor = "255,255,221";
}
else
{
this.fillColor = "233,233,233";
}

I suspect it doesn't work because as far as I can tell, buttons don't have 'values' assigned to them, so my 'if(this.rawValue == 1)' statement is probably useless.

Any suggestions?
Thanks in advance,
Peta

from way... underground at Parkes - central West NSW - Australia

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
To change the color you can use the enter and exit events of your buttons.

//enter event for buttonButton1.border.fill.color.value = "255,255,221"

//exit event for buttonButton1.border.fill.color.value = "233,233,233"

Look this thread.

Here is an example for you.
https://share.acrobat.com/adc/document.do?docid=8d368e1a-2291-4733-a3c3-276d577c19ca

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

PetafromOz
Registered: Jun 8 2009
Posts: 230
I keep forgetting you can use several script events for a single object.

You've done it again Radzmar. It works perfectly. Many thanks.

from way... underground at Parkes - central West NSW - Australia