Dynamically set the height of the rectangle
I need to define a rectangle of height according to the items it contains dynamically. I need the container to float its size accordingly.
For example:
'Apple' class needs an extra 10 pixels height
"Pear" class needs an extra height of 10 pixels
"Peach" class needs an extra 10 pixels height
So... i f I switch Apple, pear, fishing all on... I have to add 30 pixels to the height of the 'rectBasket'.
Goal: cart adjusts its height at each rocker. In the rocker by each fruit:
If (SYM $("..) (Is Apple") (": visible ")) {}
SYM $(".) Apple"). Hide();
var htApple = 0;
} else {}
SYM $(".) Apple"). Show();
var htApple = 10;
}
var htBasket = htApple + htPear + htPeach;
Is it important that PEAR and fishery variables have been set into a different scale?
sym.getComposition () .getStage ().getSymbol("GV-4Cases").$("rectBasket").css ({"height": "htBasket"});
Place immediately after, shouldn't this resizing the basket?
No luck.
I'm a 'high functioning designer' with respect to the code. Can someone correct me with a simple and clear description or give a better method (direct, easy) to dynamically change the height of the "rectBasket"?
Thank you very much! Grace
I did it. I forced myself to understand the variables (you can hear me, designers).
Goal: float a rectangle size, whose elements are oriented, such as when items are turned on, the rectangle grows (if the elements do not overlap each other). An accordion of sorts. Each of the elements is relative to the upper or down, so when the rectangle increases, the elements are drawn out.
BTW, thanks to resdesign which is always useful to read. His other posts have helped tinkering me together an answer to my specific case. THX!
Step 1:
Declare the variable in compositionReady
Declare variables as elements call later
var AppleHigh;
var PearHigh;
var PeachHigh;
var ComboHigh;
Step 2:
In the code of the rocker of each element (switching power of the Apple, pear, fishing,..), declare the variables in the main code
var AppleHigh;
var PearHigh;
var PeachHigh;
var ComboHigh;
Step 3:
Below it, create a toggle of the value of the variable
for the class of Apple
If (SYM $("..) (Is Apple") (": visible ")) {}
var AppleHigh = 55;
} else {}
var AppleHigh = 0;
}
for the Pear class
If (SYM $("..) (Is pear") (": visible ")) {}
var PearHigh = 55;
} else {}
var PearHigh = 0;
}
for the Peach class
If (SYM $("..) (Is Peach') (": visible")) {}
var PeachHigh = 30;
} else {}
var PeachHigh = 0;
}
Step 4:
Below it, declare and set the variable that matches the new height
var comboHigh is 175 + AppleHigh + PearHigh + PeachHigh;.
Alert (comboHigh) / / / uncomment to test the value in the pop up window
NOTE: 175 is the height of the initial base rectangle
Update: I use it instead
Declared ' var boxStartSize; "in both: compositionReady and above the rocker in the code of the item
In the code of the item...
var boxStartSize = sym.getComposition () .getStage ().getSymbol("GV-4Cases").$("CASE-master-box").height ();
Gets the entire value of the height
var comboHigh = boxStartSize + bottomlyHigh + pronounHigh + pseudosHigh + personalsHigh;
It is therefore only once that I copy this structure all over in different places, I didn't go back to handcode the height of the original rectangle.
Step 5:
The score allows you to change the height of the box
ENTER IN THE HEIGHT BOX.
sym.getComposition () .getStage ().getSymbol("GV-4Cases").$("CASE-master-box").css ({"height": comboHigh});
IMP: no quotes on the value of the variable.
Quotes on the value of the variable were a big obstacle for me. It took me a while to understand this detail. Ugh.
Step 6:
Create the same for each rocker of the element, then the height is re-evaluated whenever you change a toggle.
Step 7:
Assign/check the relative angle.
Check on what corner your items received! Select the item, look for the 4 tiny squares next to Global applied icon in the properties panel. Choose a corner. Where the element is fixed in relation to a parent.
Make sure that the element has a parent via dragging on a div or in a rectangle structure structure.
Example could look like this:
RectangleMaster
> RectangleApple
> Apple.svg
> RectangleFruitChoice
> RectanglePear
> Pear.svg
> RectanglePeach
> Peach.svg
Here, in this example, RectangleMaster is the parent of RectangleApple and RectangleFruitChoice. This means that I did slide the rectangles on another rectangle to build the structure. Select the element and choose a corner of the icon of small places accordingly.
Similarly, RectangleFruitChoice is the parent of RectanglePear and RectanglePeach.
In this way, you can build a complex and dynamic structure.
Best of luck to you all, code-ambitious designers out there! /GB
Tags: Edge Animate
Similar Questions
-
How to dynamically set the height and width of the image?
I'm trying to dynamically set the size of an image of "spacer", but this doesn't seem to work.
"< img src ="Images/SpacerYellow.gif"width ="5"height =" < cfoutput query = "Img" > #Img.Jan # < / cfoutput > "/ >
When I insert the source of the page and the view, it is the HTML < img src = "images/SpacerYellow.gif" width = "5" height = "745014" / > why so the stil teeny tiny image? "A better question would be, why are you trying to display an image of space which is more than 745 000 pixels high? The HTML code looks OK, so you may be panicking the browser.
From the point of view best practices, if you only want to display a value in the first row of a query, you can reference using the #MyQueryName.myColumn #. You need not include the query within the
tag. -
Dynamically set the Station process model
I noticed in an existing position, to dynamically set the active process template, you use the Engine.StationOptions.StationModelSequenceFilePath property. (Search for "How do I dynamically (at runtime) the models?").
But where do you put the statement that sets it?
Thank you
Oh yes I forgot to say in my last post
You can make a file of sequence requires a specific process template. So that no matter what the model of the station is on the sequence of file always use the designated model provide you.
With the sequence file that requires that the new process model open go to Edition > properties file in sequence. Under the Advanced tab, under model Options, select require a specific model. You will then see a box of template file. Navigate to your new template and select it. Click OK to exit.
Now, whenever this sequence file is opened, it will use this process template regardless of what is the model of the station.
Hope this helps,
-
Hello
I set 4 roles in the application. In the navigation of workflow, I created a notification. How can I dynamically set the name property of role of the Notification message so that as soon as the order is delivered to this notification, all users in this role Gets the notification message?
Thank you.Hello
Define an attribute that contains the value of one of the four defined roles. Then create an activity (with a specific function) who will choose the role and assigning to the attribute.
In the notification, give the value of the performer or performing as the name of the attribute.
This will solve your purpose.
Kind regards
Kumar. -
How to outsource the JNDI name (dynamically set the JNDI name)
Hello
In the adapters such as ftp, database, must specify the jndi name. This binds the adapter to a particular jndi name. It's certainly better that connect the adapter directly to the physical resource, I was wondering if it is possible to have still more flexibililty-setting the jndi name dynamically.
Basically my requirement is to develop a web service that reads a file from a FTP location. I know that I can outsource the file name and directory, but I wonder how to dynamically set the ftp location.
http://Darwin-it.blogspot.com/2008/03/configuration-of-FTP-synchronous-get.html gives the answer if I want to set the host name, portname, user id and password.
But I want to configure the adapter got FTP and then use this JNDI name in my service. Is this possible... I am using SOA 10.1.3.3
Kind regards
AmitI've sent.
-Rigault.
-
How to dynamically set the filter IR APEX of the value of a radio button column?
Hello
I built a simple APEX 4.2 IR report that includes column, namely "Source_Data" and a separate user to input radio button namly "P33_SOURCE_DATA" with two possible values in 'X' or 'Y '.
I would like the report filter source_data = 'X' or source_data = "Y" is applied, after each time the user clicks on the radio button P33_SOURCE_DATA. "
So my question is, how to set the value of the IR filter using the value of P33_SOURCE_DATA to the dynamic action and javascript?
Thanks in advance.
Concerning
Susanna
In this case, you can pull an onchange dynamic action on the radio, or at the click of a button.
This dynamic action update your IR region
And your IR region would have an appropriate where clause, with "Page to go" set on your radio.
-
Dynamically set the order of the symbols on the stage?
Is it possible to change the order of the symbols on the stage dynamically via the coding?
While clicking on a button would be a symbol on the back?
The reason why I ask is because even if one of my symbols is set to invisible, it still hinders my ability to click on the buttons that are technically below.
Any help would be appreciated.
Thank you
You can use the z-index with this basic format:
SYM. $('NomSymbole') .css ({' z-index': 100 '});
-
Dynamically set the width of the itemRenderer content
Hey all,.
Thank you for taking the time to look at it. what I try to do is simple, I think, but escape. I have a datagrid, the value of width of 100%. I have a total of 7 columns, the first 2 are fixed width. 5 remaining columns (and their content, which is important), should dynamically size to occupy the remaining space. I use comboboxes in these columns and can't seem to set the width of these comboboxes, based on the width of the column, in which they appear. I tried placing it just at 100%, but which causes a scrolltrack to appear and combobox is hidden behind the scrolltrack.
help is greatly appreciatedseems okay - it's just {width}, no reference to the not required column. its okay?
-
Dynamically set the icon in a LinkButton
I use several controls link as navigation devices button in my application. When the LinkButton are created they are given all the four properties of the icon as follows:
upIcon= "@Embed(source='images/Off_1.gif')"" "
" icon = ' @Embed(source='images/Off_1.gif') "
overIcon= "
@Embed(source='images/Over_1.gif') "
downIcon= "@Embed (source =" images/_1.gifsalt ' ")" " "
The second LinkButton would have the same properties as stated except that it would have it's own set of GIF. Because these are navigation buttons in my application I want to be able to click on a LinkButton and have is downIcon GIF became the icon GIF. In this way, it seems that the button has slept selected and gives the end user a visual indication of where they are in the application.
Problem is how to set the State of the icon of a LinkButton and make it show? I tried this CODE but it did not work... It does not generate an error... is there just no visual effect.
LinkButton_1_ID. setStyle ('icon', 'images/Sel_1.gif');
So if you have ideas on how to change the icon on a LinkButton please let me know. Thank you in advance for your help!
Have an ordinary day...
KomputerMan ~ | :-)
You are probably better off just using a Button with custom skins. But if you do want to swap out the icon, you'll need to embed the asset as a Class:
-
Dynamically set the Destination URL
Hello
I have to set Destination URL dynamically.
return.setDestination("OA.jsp?page=/oracle/apps/pa/project/webui/HomePG");
If (PageContext.GetParameter ("Return")! = null)
{
But when I clk on btn Im nt can access the home page.
}
If I use pagecontext. SetforwardURL() for the back than the URL of the page button cannot be changed is that the same page url rather than the URL of the home page, but the page navigates to the home page.
Please help me...
Thank you
Nani :)Hello
I created a button bean progrmatically.
and put the url of destination dynamically by using this code... its works very well
Button OAButtonBean = (OAButtonBean) createWebBean (pageContext, OAWebBeanConstants.BUTTON_BEAN, null, 'BUTTON');
button.setText ("Test button");
button.setDestination("OA.jsp?page=/oracle/apps/pa/projupdate/webui/ProjectListPG");
webBean.addIndexedChild (button);Thank you
Gerard -
Dynamically set the size of table
Hello world!
I have a table of cluster (each cluster contains 4 values) and according to the interactions between users, new groups are added to the table. I would like to set up a 'Clear' button which removes all elements inside the table, but I can't find a solution so far. The best I can do is put all the elements of the cluster to 0 but the cluster itself is always in the table.
Does anyone know how to do?
Thank you very much
Julien
Hi jfcors,
the cluster must be in the table, because it defines the type of data in the table.
You also seem poorly understand the term "empty array": a table is empty when there is no elements inside!
Extracted from:
@aCe:
Your example only removes an element of an array, but not the entire table! Sorry, it's okay...
-
I have the bitmap image. Now, I want the bitmap to the screen but its size should be as mobile width and adjust the picture accordingly. For the former I enlarge it should look like small small mobile screen.
My code but its not working.
public static BitmapField getHeader() throws NullPointerException {}
Bitmap b = Bitmap.getBitmapResource("img/logo.jpg");
return (new BitmapField (b, Field.FIELD_HCENTER) {})
Protected Sub layout (int width, int height) {}
setExtent (365, 80);
}
});
}You will need to put the image yourself to match the dimensions you need.
Watch Bitmap.scaleInto)
If you have transparent images, then watch this:
http://supportforums.BlackBerry.com/T5/Java-development/resizing-transparent-bitmaps/Ta-p/703239
-
dynamically set the onclick event in setAttribute with bbui
Hello
what I want to achieve is to create an onclick event in a ListItem which is passing a variable to the function of bb.pushScreen (). I have it?
1. after a loading screen, I created a dynamic list with items that have an onclick event.
listItem = document.createElement('div'); listItem.setAttribute('data-bb-type', 'item'); listItem.setAttribute('data-bb-title', title); listItem.setAttribute('data-bb-accent-text', combindedDate); listItem.setAttribute('onclick', "bb.pushScreen('page.htm', 'page', '666');");
2. If clicked article opens a new page, because of the onclick attribute. (works well)
The additional option (666) must be a variable. I couldn't understand how to solve this problem.
There must be a way I can pass a variable in the new created element the bb.pushScreen funtion.Any ideas?
The best
bert2002
UPDATE: just sitting once again and its possible some flee:
listItem.setAttribute('onclick', 'bb.pushScreen(\'page.htm\', \'page\', \''+ itemid +'\');');
chadtatro wrote:
Just helped a friend with the same thing yesterday, it was also a problem of leaks... the "update" sounds good to me, it's good now?
Yes absolutely is working very well
-
How to dynamically set the containers/component
Hello
I want to put on if containers of other condition.i.e condition if - set another container2 container1. How can I do? Any reference?
Hey there,
Because the way this all happens at the start of your application, simply use the add method that Simon bound for you in his first response. Don't worry the method replace because that is only for all the containers that are already visible (or is already a child) within your root container (or whichever it is).
// Just as an example from QSettings... if (mySettings.value("firstcontainer", 0) == 1) { myFirstContainer = Container::create() .layout(StackLayout::create()) .objectName("firstContainer") .vertical(VerticalAlignment::Center); // Add anything else for your first Container... // Then finally, you add it to your main or root // container with the add() function. Hopefully your // mainContainer is either a class member variable or // declared and initialized somewhere above this // if-else statement. mainContainer->add(myFirstContainer); } else { mySecondContainer = Container::create() .layout(StackLayout::create()) .objectName("secondContainer") .vertical(VerticalAlignment::Center); // Add anything else for your second Container... mainContainer->add(mySecondContainer); }
However, if somehow somewhere else in your application, you want to change the containers because the user has changed the value QSettings, you would replace it...
if (user_wants_firstContainer) { replaceC = mainContainer->findChild
("secondContainer"); myCurrentContainer = myFirstContainer;} else { replaceC = mainContainer->findChild ("firstContainer"); myCurrentContainer = mySecondContainer;} if (replaceC) { replaceIndex = mainContainer->indexOf((Control*) replaceC); if (replaceIndex >= 0) { replaceC = (Container*) mainContainer->replace(replaceIndex, myCurrentContainer); // If you want to, you can just delete the replaced container here delete replaceC; }} -
Hi gurus... I have the script as below:
I created a search page that gives me different workflow process in the table of results for an employee. Need to convert each process name to point to different pages, which shows the specific details of the process. Please provide your input on how we can convert this column programmatically to point to different pages.
Thanks in advance.
Deepak
Deepak,
You may need to encode the URL.
How to encode a string or the form of URL in java setting
OR
Please take a look at the link below:
Learn Oracle Applications with me: OAF: passing parameters, the encryption, encoding
URL parameters: Encryption and encoding
When we move from the parameters in the URL, following should be considered:
{@Attr} - encodes. Becomes Prince khalid Prince % 20Kapoor
{! Attr} - crypt. Encrypts sensitive information.
{$Attr} - simple substitution token (without encoding and encryption)
{@RETURN_TO_MENU}-used for E-Business Suite Personal Home Page. Identical to OAWebBeanConstants.RETURN_TO_MENU_URL.
{@RETURN_TO_PORTAL}-send the user to a portal launch page. Same asOAWebBeanConstants.RETURN_TO_PORTAL_URL.on this basis, try {$Documentumurl}
Another option is to create a function to use FunctionName instead of giving the path,
Replace OA.jsp?page=/xx/xxx/xx/xx to OA.jsp? OAFunc = XXXXXX in the VO.
I hope this helps.
See you soon
AJ
Maybe you are looking for
-
Firefox does not display correctly boxes or text boxes
Hello, most of the time on many websites as a part of the show lines bounadry textbox or anything. This can be difficult when it shows nothing when I need to move my cursor to start entering text, except that he's looking for unsightly.Also sometimes
-
MacBook 2016 cannot read an My Passport Slim external
Hello everyone My new 2016 MacBook has only a single USB - C port that connects to Western Digital My Passport Slim disk external DRIVE via a USB HooToo multiport adapter. OS X in it just cannot read HARD drive even through it will make a sound when
-
Pavilion 15-AB044SA: Downgrade from Windows 8.1 to windows 7 on HP Pavilion 15-AB044SA
I just branch a refurbished HP 15-AB044SA comes with preinstalled Windows 8.1. I'm not a fan of the operating system and want to downgrade to windows 7. Could you please guide me to the decommissioning? And I have the same funcitionality in the lapto
-
Missing drivers for PCI Simple Communications Controller
Hello I need help to find the suitable driver for my PCI of Simple Communications controller Compatible IDs: PCI\VEN_8086&DEV_8C3A&REV_04 PCI\VEN_8086&DEV_8C3A PCI\VEN_8086&CC_078000 PCI\VEN_8086&CC_0780 PCI\VEN_8086 PCI\CC_078000 PCI\CC_0780 Thank y
-
Mounting ears for a Cisco/Tandberg C40
I've been going around in circles now for weeks. Anyone where I can retrieve a set of ears for a Cisco/Tandberg C40 system rack?