AS3 - making an index for each item in list box
Hi guys,.
I'm puzzled. It could be something simple that I'm doing wrong.
I have a table populated by XML based on the following inside the function:
first_special.addItem({label: xmlMenuFile.item.headers[i],data: xmlMenuFile.item.descriptions[i],data2: xmlMenuFile.item.hints[i]});
The problem I have is trying to find a way for the "data2" will fill the text field 'hint_txt' on ROLL_OVER of the same name of items in the list.
I tried to place an event listener in the function that populates the drop-down list box, but does not
// this populates the combo box label and data with the Loaded XML File. This works function changeHandler(ev:Event):void { menuText_mc.heading1_txt.text = ev.currentTarget.selectedItem.label; menuText_mc.description1_txt.text = ev.currentTarget.selectedItem.data; heading1 = ev.currentTarget.selectedItem.label; includePrice1_mc.visible=true; // trying to figure out how to activate the 'hinting' function when you ROLL_OVER EACH ITEM in the 'first_special" combo box // and when rolling over it trace 'hello'. This DOES NOT WORK. first_special.addEventListener(MouseEvent.ROLL_OVER, hinting); } function hinting(e:MouseEvent):void{ // Should trace "hello" everytime I Roll_OVER an item in the Combo Box. trace("hello"); } // calls the changeHandler function and works correctly first_special.addEventListener(Event.CHANGE, changeHandler); Any help with this would be great. Thanks
For the features of indicators, I think you want to define...
Import fl.events.ListEvent;
function hinting(e:ListEvent):void {}
var rowIdx:uint = e.rowIndex as uint;
hint_txt. Text = .data2 first_special.getItemAt (IdxLigne);
}
first_special.addEventListener (ListEvent.ITEM_ROLL_OVER, hinting);
What you react only to roll on the main component, not the elements, and this reversal starts to happen until you have selected an item since you buried the listener inside the change function. Keep the headset out in the open.
Tags: Adobe Animate
Similar Questions
-
Ungroup a group and keep the scriptlabel for each item in the Group
Hello
does anyone know how to ungroup a group of rectangles with a certain tag (example groupA) give one every rectangle a clean label (the same text groupA)
I can find the Group and ungroup it but I can't label the rectangles...
var oPageItems = app.activeDocument.allPageItems;
for (var j = oPageItems.length - 1;) j > = 0; d-) {if (oPageItems [j] .label == ("groupA")) {oPageItems [j] .ungroup ()))}}
...???
Help, please
Hello
front
oPageItems [j] .ungroup ();
go through the loop and set a label for each item within the Group:
for (var k; k)< opageitems[j].length;="">
oPageItems [j] [k] .label = "groupA";
assuming that your oPageItems [j] is a group indeed.
I hope that...
-
Different color for each item in the list
Hi all
I am currently working with a List component and I am looking to change the color of the font for each item individually. Flex allows you to do this? If so, can someone post a solution. Thank you in advance.
override the private function data (value: Object): void
{
Super.Data = value; EXTREMELY IMPORTANT THAT YOU DO THIS FIRST
If {(value)
Examine the value and determine the color
setStyle ("color", somecolor);
}
}
]]>
-
Debug log 5 Apex: "cannot find index for the item.
I just spotted some strange output in the debug log in an application built in 4.0, still, using this mode of compatibility, now in 5.0.1
Some error messages for crawlers
Fetch application meta data can not find index for component (3,15469335749905175) can not find region index for region #15469335749905175 when trying to add (1,15481314906419581) - it must be excluded because of REQUIRED_PATCH
Can anyone advise me on what it means? Or what other information of interest?
Nothing seems to be a problem with the page. The specified region is extremely basic html with a compilation option that is excluded. Other regions with the same compilation option do not report these log files in the debug.
Scott.
Hi Scott,.
It is indeed related to the build option and you can ignore the messages. I'll put their debug level 9 If you don't see them in the normal debug output.
Before the page is rendered, APEX load relevant metadata in the wwv_flow package global variables. For example, fill us the tables g_items, the g_buttons and the g_plugs with the definitions of element, button and region, respectively. We do not charge the definitions of components that are excluded by a compilation option. After loading these data, we must build relationships between records, for example, we calculate index of the item in the g_plugs region and store it with the definition of the element. If the region is excluded by a compiler option, but the underlying element is not, the computation of the element cannot find the related region folder in g_plugs. You get messages from debugging for this kind of inconsistencies.
Kind regards
Christian
-
How to find the first max value for each item
Hello
I have the me_result of the table as below,
SELECT * FROM me_result;
ID ||| ELITE ||||||||||| FREQ_ITEM | COMBINED_STR | SUP
1 ||; 1; 10; 2; 3; 4; 5; 7; 8. 1 ||||||||||||||; 1; 10; 2; 3; 4; 5; 7; 8 ||| 2
2 ||; 1; 10; 2; 3; 4; 5; 7; 8. 2 ||||||||||||||; 1; 10; 2; 3; 4; 5; 7; 8 ||| 2
3 ||; 1; 10; 2; 3; 4; 5; 7; 8. 3 ||||||||||||||; 1; 10; 2; 3; 4; 5; 7; 8 ||| 2
4 ||; 1; 10; 2; 3; 4; 5; 7; 8. 4 ||||||||||||||; 1; 10; 2; 3; 4; 5; 7; 8 ||| 2
5 ||; 1; 10; 2; 3; 4; 5; 7; 8. 5 ||||||||||||||; 1; 10; 2; 3; 4; 5; 7; 8 ||| 2
6 ||; 10; 2; 3; 4; 5; 8; 9. 1 ||||||||||||||; 10; 2; 3; 4; 5; 8; 9; 1 ||| 1
7 ||; 10; 2; 3; 4; 5; 8; 9. 2 ||||||||||||||; 10; 2; 3; 4; 5; 8; 9 ||| 2
8 ||; 10; 2; 3; 4; 5; 8; 9. 3 ||||||||||||||; 10; 2; 3; 4; 5; 8; 9 ||| 2
9 ||; 10; 2; 3; 4; 5; 8; 9. 4 ||||||||||||||; 10; 2; 3; 4; 5; 8; 9 ||| 2
10 ||; 10; 2; 3; 4; 5; 8; 9. 5 ||||||||||||||; 10; 2; 3; 4; 5; 8; 9 ||| 2
I need to find the first COMBINED_STR max for each element of the ELITE,
I mean, max value is the max REGEXP_COUNT (combined_str,' ;')))
really, I try to write down, but I had a lot of values for each ELITE and I need only the first, that
SELECT * from me_result
WHERE (ELITE, REGEXP_COUNT (combined_str,' ;')))) IN
(SELECT ELITE, MAX (REGEXP_COUNT (combined_str,' ;'))))) ME_RESULT ELITE GROUP);
I need the result to be as below.
1; 1; 10; 2; 3; 4; 5; 7; 8-1; 1; 10; 2; 3; 4; 5; 7; : p
6; 10; 2; 3; 4; 5; 8; 9 1; 10; 2; 3; 4; 5; 8; 9; 1 1
any help please,.
Published by: user11309581 on July 10, 2011 22:03Can be
with t as (select 1 ID, ';1;10;2;3;4;5;7;8' ELITE, 1 FREQ_ITEM, ';1;10;2;3;4;5;7;8' COMBINED_STR, 2 SUP from dual union all select 2 ,';1;10;2;3;4;5;7;8' ,2 ,';1;10;2;3;4;5;7;8' ,2 from dual union all select 3 ,';1;10;2;3;4;5;7;8' ,3 ,';1;10;2;3;4;5;7;8' ,2 from dual union all select 4 ,';1;10;2;3;4;5;7;8' ,4 ,';1;10;2;3;4;5;7;8' ,2 from dual union all select 5 ,';1;10;2;3;4;5;7;8' ,5 ,';1;10;2;3;4;5;7;8' ,2 from dual union all select 6 ,';10;2;3;4;5;8;9' ,1 ,';10;2;3;4;5;8;9;1' ,1 from dual union all select 7 ,';10;2;3;4;5;8;9' ,2 ,';10;2;3;4;5;8;9' ,2 from dual union all select 8 ,';10;2;3;4;5;8;9' ,3 ,';10;2;3;4;5;8;9' ,2 from dual union all select 9 ,';10;2;3;4;5;8;9' ,4 ,';10;2;3;4;5;8;9' ,2 from dual union all select 10 ,';10;2;3;4;5;8;9' ,5 ,';10;2;3;4;5;8;9' ,2 from dual ) select ID,ELITE,FREQ_ITEM,COMBINED_STR,SUP from ( SELECT ID,ELITE,FREQ_ITEM,COMBINED_STR,SUP, ROW_NUMBER() over (PARTITION BY ELITE order by id) RN FROM t WHERE (ELITE,REGEXP_COUNT(combined_str,';')) IN (SELECT ELITE,MAX(REGEXP_COUNT(combined_str,';')) FROM t GROUP BY ELITE) ) where RN=1 order by id ID ELITE FREQ_ITEM COMBINED_STR SUP ---------------------- ----------------- ---------------------- ----------------- ---------------------- 1 ;1;10;2;3;4;5;7;8 1 ;1;10;2;3;4;5;7;8 2 6 ;10;2;3;4;5;8;9 1 ;10;2;3;4;5;8;9;1 1
-
date min for each month of list
Hi all
I need to select only minimal date for each month in this example query:
If the result should be:select date '2011-01-04' as adate from dual union all select date '2011-01-05' as adate from dual union all select date '2011-01-06' as adate from dual union all select date '2011-02-01' as adate from dual union all select date '2011-02-02' as adate from dual union all select date '2011-02-03' as adate from dual union all select date '2011-10-03' as adate from dual union all select date '2011-10-04' as adate from dual union all select date '2011-10-05' as adate from dual
How can I make it?04.01.2011 01.02.2011 03.10.2011
WITH dates AS (SELECT DATE '2011-01-04' AS adate FROM DUAL UNION ALL SELECT DATE '2011-01-05' AS adate FROM DUAL UNION ALL SELECT DATE '2011-01-06' AS adate FROM DUAL UNION ALL SELECT DATE '2011-02-01' AS adate FROM DUAL UNION ALL SELECT DATE '2011-02-02' AS adate FROM DUAL UNION ALL SELECT DATE '2011-02-03' AS adate FROM DUAL UNION ALL SELECT DATE '2011-10-03' AS adate FROM DUAL UNION ALL SELECT DATE '2011-10-04' AS adate FROM DUAL UNION ALL SELECT DATE '2011-10-05' AS adate FROM DUAL) SELECT TO_CHAR (MIN (adate), 'DD.MM.YYYY') adate FROM dates GROUP BY to_char(adate, 'YYYY.MM') ADATE -------------------- 03.10.2011 01.02.2011 04.01.2011
-
Remove the space between the items in list box
Hello
I have a list box, I need to change the space between each item in the drop-down list.
(ex)
test
Test1
test2
I need it to change the space between the test and vice versa test1.
Kind regards
Roman papail
You must specify the list control rowHeight for example
If this post answers your question or assistance, please mark it as such.
-
the list widget with different colors for each item in the list?
I'll add a widget list to my interactive color wheel:
* http://r0k.us/graphics/SIHwheel.html
It is an old applet, first published in 1998 and older than Swing.
The list contains the names of color 1 567 which he knows the color values. I want the background color to each element to be one of the named color. The forefront color name text will be white or black, chosen for readability to her background. Basically, I'm hoping to accomplish what the name of this color page did with its list widget HTML-form:
* http://chir.ag/projects/name-that-color/
I studied the java.awt.list document:
* http://download.oracle.com/javase/1.4.2/docs/api/java/awt/List.html
SetBackground() and setForeground() methods are implemented, but they seem to apply only to the list as a whole. As far as I know, it seems there is no access to list items themselves as components. I hope that I am just missing what is obvious.
-RichWhat you want to do can be easily implemented on a JList swing, with the help of a custom converter. I would advise therefore to rewrite your applet in the swing, then use a JList. That way you can skip JUnit is studying just to force your applet awt to do something of awt was neither designed for and focus on swing of things GUI. Below is an example of how you can implement your JList:
import java.awt.*; import java.math.BigInteger; import java.util.Arrays; import java.util.Comparator; import javax.swing.*; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; public class ColorList { public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { new ColorList().createGUI(); } }); } private void createGUI() { String[][] array = getArray(); // sort the array as you wish Arrays.sort(array, new Comparator
() { @Override public int compare(String[] o1, String[] o2) { return o1[1].compareTo(o2[1]); } }); // create the JList final JList list = new JList(array); // set some adequate renderer list.setCellRenderer(new DefaultListCellRenderer() { private static final long serialVersionUID = 1L; @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { DefaultListCellRenderer renderer = (DefaultListCellRenderer) super .getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); renderer.setText(((String[]) value)[1]); int color = new BigInteger(((String[]) value)[0], 16) .intValue(); renderer.setBackground(new Color(color)); renderer.setForeground(new Color(0xFFFFFFFF ^ color)); return renderer; } }); final JLabel demoLabel = new JLabel( "Display this text in the selected color", JLabel.CENTER); list.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { String[] selected = (String[]) list.getSelectedValue(); demoLabel.setForeground(new Color(new BigInteger(selected[0], 16).intValue())); } }); JFrame frame = new JFrame("ColorList"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(new JScrollPane(list), BorderLayout.LINE_START); frame.add(demoLabel, BorderLayout.CENTER); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); } private String[][] getArray() { return new String[][] { { "000000", "Black" }, { "000080", "Navy Blue" }, { "0000C8", "Dark Blue" }, { "0000FF", "Blue" }, { "000741", "Stratos" }, { "00FF00", "Green" }, { "FF0000", "Red" }, { "FFFFF0", "Ivory" }, { "FFFFFF", "White" } }; } } Piet
-
As a component of item in list box
Hello
I have created a ListView with components list item as a label and a checkbox control.
When I check the box on a list item, I will not get an onTrigger event in the list. Thus, there is no way to check if the box is checked or unchecked. I don't need a single checkbox to be in a State of "verified" in both listview.
I tried to get the row of the box that is checked and call a function to browse the path to the index. Now I want to uncheck all of the boxes other than the one that is checked today.
CheckBox { id: checkBoxId horizontalAlignment: HorizontalAlignment.Right verticalAlignment: VerticalAlignment.Center onCheckedChanged: { var rowNum = rootContainer.ListItem.indexPath; count = articlesDataModel.size(); toggleCheckBox(); } } function toggleCheckBox() { for (var i=0 ; i< count ; i++) { if(rootContainer.ListItem.indexPath[i]!= rowNum) { ???????? } } }
This is the code that I have tried. But I don't know how to get the control box here inside...
Could someone please look into this?
Thank you
SJ
Hello..
This link helped me to solve this problem. Thank you
-
Is it possible to add images/icons for a drop-down list box?
I have created a form with several fields of text. The customer wants to be able to 'mark' some/all the of them with an icon (until there are only two icons of your choice)
Due to the limit "real estate" on the form, it would help a lot if I could add these icons to a simple drop-down list. Unfortunately, I found no way to do it.
Such an option exist?
... and if so, how?
Thanks for any help or information
No, but you can use a button to display images/graphics. If you are using JavaScript (for example, app.popUpMenuEx) to view the selections of text after you click the button, the script will mark the button icon to the corresponding selection. There are other similar types of things that would make with the buttons, but all rely on JavaScript. Note that this type of approach does not work on most mobile PDF viewers and not Adobe PDF viewers.
-
View creating Spry menu bar shows only preview of items in list boxes
In Dreamweaver CS6, all of a sudden, my Spry stopped display in Design view menu bar, unless I click on Live. Live, it displays correctly with all styles. As in any browser displays correctly. Without Live in Design view, I see the box with no style and no text. However, if I click on the text, it will highlight the invisible text and it shows the location of the text in code view. This seems to be an option that I turned on accidentally or is it controlled by the properties?
Thank you. Menu Pop Magic 2 solved all the problems I had with Spry quickly and well.
-
Subform repeat for each data item is grayed out
I try to use a button of Add a subform. I know that I must have the repeating subform Flowed (what I did) and I know that I should set the subform to repeat for each item of data at 1 Min. However, the subform to repeat for each item of data is grey so I can't select.
What I am doing wrong?
Thank you
MDawn
You can ask the most subform roof parent to pass on to activate the option Repeat subform.
Thank you
Srini
-
How to set a different color for the items in selectManyCheckbox
Hello
I would like to change the background color of text element for each item in selectManyCheckbox (different for each element).
It is only 5 points which could be static reference or select.
I only know how to change background for all items
AF | selectManyCheckbox:item-{text}
Background: orange;
}
How to select concrete question text and change color for them alone?
I have the similar problem.
CSS - background color defined for each individual p:selectManyCheckbox checkbox - Stack Overflowbut it don't work for me because I don't have a structure very adf
I need somethink like this:
AF | selectManyCheckbox:item - XXXX text - select a question by number here in the list or the id {}
Background: orange;
}
I use selectBooleanCheckbox in the forEach loop
-
Compare 2 channels for similar items
I have 2 strings - string A and B String
String a (1,2,3,4,5,6,7,8)
Channel B (1,2,3,4,9,10,11,12)
I need to compare the 2 strings and find the values that ARE in the TWO channels.
If the answer that I need to get is 1,2,3,4 1,2,3,4 in the TWO channels.
I can't find anything in the string functions see
Any ideas?
There are different ways to slice it. But a general approach is to make a loop on one of the lists. Then for each element, use list functions (IE, listFindNoCase, etc.) in order to determine whether it exists in the list of other institutions. If this is the case, add the value to a variable. At the end of the loop, you will have a list of items in the two lists.
That said, cflib.org is always a good place to check first.
-
Several records displayed on the form to a time-2 lines for each record
Hello
I have a Web in which I want to display to 8 records at the time, in the data block, I've specified 8 as value "number of records".
However, the record includes too many fields to display on 1 vertical line, I wish so to divide the fields into two separate lines, there will always be 8 folders, but each in two lines.
How do I do that?
I use form 10g. The block is a block of database using QUERY CLAUSE, and the canvas is stacked.
Thank youSandy,
You will need set the 'Distance between Records' property for each item in the block for multiple registration. This will increase the space between the lines, so you can stack them in two rows. Unfortunately, you cannot set this property to the block - so you must set for each display element.Hope this helps,
Craig B-)If someone useful or appropriate, please mark accordingly.
Maybe you are looking for
-
I was wondering what happened to 'video zone' and 'facebook for android '. now I'm thinking that the video box developers do not support 1.5 more. at least his party 1.5 market but on my htc hero friends and I think that those who run on 2.1 not real
-
Creating an icon of web browser for Playbook
Following the steps described on this page below I'm stuck at the part of creation of the full browser due to some certificate on the command line error messages. This position requires update? I am able to create a web application "chrome", but I
-
Error number: 8DDD0020 from the Windows Update Catalog WEB SITE
Error number: 8DDD0020 the Windows Update Catalog WEB site. This clean install Windows 7 Ultimate SP1. I would like to stress that this is not a malfunction of Windows Update. This works well for me. It's Web Site (http://catalog.update.microsoft.com
-
Activation code for free copy the school laptop.
Original title: Activation Code for windows issues. Hi, I graduated from high school last year, and since that time, I received my free copy of the laptop. But I forgot the code of online activation, then I used comes from this laptop again. He asked
-
Win 8-media library - Win 8 'ITETech' driver Leadtek Winfast DTV 2000 DS
I installed W8 and media library with a TV Tuner DS Leadtek Winfast DTV 2000 card. When the TV card with the 'ITETech' of Win8 driver, the TV tuner works fine, but the remote MCE DO NOT work. If I install the newer OEM driver of Leadtek, MC DO NOT of