2 colors on several block record

How 2 color block multi-record without external tool. IM using devsuite10g R2.


for example:
1. each same white = datarowrecord;
2. each odd gray = datarowrecord;

It is im going to make loop? and call the Visual attribute 2 to paint in each multirecord base on the MOD function?

in the powerscript code > > is something like this: if (currentrow () = getrow(), 65535, if (mod (getrow (), 2) = 0, 79741120, rgb (255,255,255)))

TNX...

Yes, you can do it by using a java bean. Take this as a starting point:

The java code

package forms;
import java.awt.Color;
import oracle.forms.ui.VTextField;
import oracle.forms.properties.ID;

public class CField  extends VTextField
{
  public static final ID ODDROW   =ID.registerProperty("ODDROW");
  public static final ID EVENROW  =ID.registerProperty("EVENROW");

  private static final Color m_oddColor=Color.YELLOW;
  private static final Color m_evenColor=Color.RED;

  public boolean setProperty(ID id, Object value)
  {
    if (id==ODDROW)
    {
      setBackground(m_oddColor);
      return true;
    } else if (id==EVENROW)
    {
      setBackground(m_evenColor);
      return true;
    } else
    {
      return super.setProperty(id, value);
    }
  }

}

Build an a pot of this code and add the jar to your archive or archive_jini-tag in the formsweb.cfg

In your form, set the class of implementation to "Forms. CField' for all elements of text in your building.

Create this procedure in your form

PROCEDURE PR_COLOR_BLOCK(i_vcBlock IN VARCHAR2) IS
  nRowsDisplayed NUMBER:=GET_BLOCK_PROPERTY(i_vcBlock, RECORDS_DISPLAYED);
  bOdd           BOOLEAN:=TRUE;
  vcProperty     VARCHAR2(10);
  vcItem         VARCHAR2(61);
BEGIN
  FOR i IN 1..nRowsDisplayed LOOP
    IF bOdd THEN
      vcProperty:='ODDROW';
    ELSE
      vcProperty:='EVENROW';
    END IF;
    bOdd:=NOT bOdd;
    vcItem:=GET_BLOCK_PROPERTY(i_vcBlock, FIRST_ITEM);
    LOOP
      EXIT WHEN vcItem IS NULL;
      SET_CUSTOM_PROPERTY(i_vcBlock || '.' || vcItem, i, vcProperty, '.');
      vcItem:=GET_ITEM_PROPERTY(i_vcBlock || '.' ||vcItem, NEXTITEM);
    END LOOP;
  END LOOP;
END;

Call the procedure in the WHEN-NEW-FORM-INSTANCE-trigger.

For other types of items, such as checkboxes and Poplists, you write according to classes. Also, if you want to change the color when scrolling, you will need some other encoding.

Tags: Oracle Development

Similar Questions

  • Several blocks of the same canvas and window update

    Hi all

    I want to update several blocks from the same canvas and the window. I also want to find an alert before saving the data. Based on the current record, I want to update only
    data in the record.

    Can you help me anyone in this regard.

    Arif

    You must write the validation key trigger to the block level

    I don't think so. As it is not possible to hire only a single block, what would be the use of a KEY VALIDATION trigger at the level of the block? The only effect would be that the shape has according to different where the cursor is positioned.

    If you want the dynamic Blockname (and all blocks of share the same fields that you are filling), you can do something like

    if show_alert('ALERT_TO_VERIFY')=alert_button1 then
      COPY('3', :SYSTEM.TRIGGER_BLOCK || '.REC_STATUS');
      COPY('P', :SYSTEM.TRIGGER_BLOCK || '.TASK_STATUS');
      COPY('P', :SYSTEM.TRIGGER_BLOCK || '.PERMISSION_UPDATED');
      commit_form;
      execute_query;
    end if;
    

    BTW... Why is - that update you the block after commit?

  • How to set the color palette for the system colors for the visible record of all controls on the web page?

    The color scheme by default in Windows 7 (x 36, Premium family edition) offers a combination of a white background for the application windows and black text for information that are there.   But being a visually handicapped person, I find the white background rather irritating to the eyes, and I'd rather have a black background, with white text, as this combination gives me a comfortable environment to work on the computer for long periods.  When I set these colors according to my convenience, using the link ' Customize > window color > color and appearance of windows "and by changing only the colours of the just 'Windows' choice in the dialog box, I think the colors of several other controls, in particular the"Drop Down Lists","Framed"and"Buttons"are also changed, often to be the same thus making the information unreadable such controls.  As these color changes seem to be rather random and apparently 'unpredictable', I cannot set the application window, according to my convenience.  I'm not able to get any useful information from the link "Help and Support" of the STARTUP dialog, about the dependencies of the combinations of colors of controls, or the link dialog box "Customize > window color > color and appearance of windows ' lists all controls that are normally used in any typical web page.  After spending a lot of time and effort - and therefore actually "lose" my time at the computer - through several tests, with all giving them negative results, I am at a loss to get this problem is solved.  Furthermore, I can't go back to the default of origin either.  So my computer is idle for a very large part of the day.

    I would be really grateful to all users or personal assistance MS, who take the time to provide me with an answer to this problem and help me use the computer in a fruitful way.  I offer my sincerest thanks in advance to anyone who offers me a complete solution.

    Hello

    I suggest that you go through the Microsoft article and check if it helps.
  • How to fill out (display) values for several blocks in which there is no relationship between the blocks (tables).

    Hello.

    Is it possible to fill in the values (execute_query) several blocks where there is absolutely no relationship between the tables in the same form?

    There is no relationship between the tables. All are separate tables with different columns. None of the names of columns match

    & also the values of the columns do not match. I created blocks for all tables. When I click on run, only the first block of values (first picture) is filled.

    other values of block did not get filled. Is it possible to fill in the values for all of the blocks where there is not relationship, or when there is no master block?

    Is there something I can do for this? It is mandatory for me to put all the blocks in a single form.

    Help me, please. Please do not respond.

    Thank you.

    Create a key-EXEQRY-trigger on the block where 'throw you' the quers. In it, put something like

    GO_BLOCK ('BLOCK1');

    EXECUTE_QUERY;

    GO_BLOCK ('BLOCK2');

    EXECUTE_QUERY;

    ...

  • How to generate color on the block diagram box?

    v: * {behavior:url(#default#VML) ;} O'Bryan: * {behavior:url(#default#VML) ;} w\: * {behavior:url(#default#VML) ;} .shape {behavior:url(#default#VML) ;}}}} Normal 0 false false false MicrosoftInternetExplorer4 / * Style Definitions * / table. MsoNormalTable {mso-style-name: "Table Normal" "; mso-knew-rowband-size: 0; mso-knew-colband-size: 0; mso-style - noshow:yes; mso-style-parent:" ";" mso-padding-alt: 0 to 5.4pt 0 to 5.4pt; mso-para-margin: 0; mso-para-margin-bottom: .0001pt; mso-pagination: widow-orphan; do-size: 10.0pt; do-family: "Times New Roman"; mso-ansi-language: #0400; mso-fareast-language: #0400; mso-bidi-language: #0400 ;} "}

    I found the code snippet below into an example, but I can't recreate the color box on the block diagram using LV 8.6.  I can generate a color of the front box and then change to a constant on the block diagram, but I wouldn't be able to insert a color area directly from one of the palettes on the block diagram?

    Thanks in advance.

    jjgors wrote:
    The color box constant is in the palette "graphics and sound-> photo functions.

    and much more...

  • Color for the library records label

    In Lightroom, I can have a dozen files with work of post-production pending & others who are complete, export etc. I'd power color label library files, so I can quickly assess where I am and what to do next. Is it possible or would it be a future update?

    It is not possible in Lightroom. You can assign color labels to your pictures to indicate State in your workflow, but not records.

  • Sum on multi block record for only displayed records

    Dear all,

    I've been invited below question on interview session and I really do not come upwards with a logic to accomplish.

    In a multi record block, not the displayed items property has the value 10. In this block, an element is placed named current_rate (Number data type).

    While the form is running, it will display 10 records, and I need to display the sum of the current_rate for these 10 records. When I scroll to display multiple records, this amount must also be changed based on the record number of display. Is it possible to make forms to operate this way?

    Please advice.

    Thank you and best regards,

    The roots.

    Another way - create element (e.g. "sum") in a block of control (for example, "cb") and write this:

    -Prior REQUEST for the block of data (for example "E1")

    : cb.sum: = 0;

    -After REQUEST for the block of data (for example "E1")

    : cb.sum: =: cb.sum +: emp1.salary;

    Query the property size array in a data block (specifies the maximum number of records Form Builder to retrieve from the database at the same time)

    must be 0 (default = the number of records can display the block, as indicated by the property of block number of records displayed).

    Concerning

  • How can I change the background color of a block of text?

    How can I change the background color of a text frame in InDesign?

    Select the text block with the selection tool black. Activate (click on) the button fill to the bottom of the Toolbox. Then, go in the swatches Panel and click on a color swatch.

  • change the color of text blocks only the active layer

    Well my script to change the color of the text frame changes the color of all the blocks of text hidden or not.

    I need to change only the visible text blocks.

    If (app.documents.length > 0) {}

    newCMYKColor = new CMYKColor();

    newCMYKColor.black = 0;

    newCMYKColor.cyan = 0;

    newCMYKColor.magenta = 0;

    newCMYKColor.yellow = 0;

    for (i = 0; i < app.activeDocument.textFrames.length; i ++) {}

    textArtRange = app.activeDocument.textFrames [i] .textRange;

    textArtRange.characterAttributes.fillColor = newCMYKColor;

    }

    }

    Any ideas on how the way only change the color of the text on the active layer blocks? In the final script I want to hide all other layers so if it could be done by a visible attribute more easily that would work just as well.

    Thank you

    Duane Leach

    Hello

    It will work for you?  Have not tested much beyond text blocks in groups and those who are just stand-alone on the layer.

    If (app.documents.length > 0) {}

    var thisDoc = app.activeDocument;

    newCMYKColor = new CMYKColor();

    newCMYKColor.black = 00;

    newCMYKColor.cyan = 40;

    newCMYKColor.magenta = 50;

    newCMYKColor.yellow = 50;

    Need to retrieve blocks of text within the groups on the layer.

    var artSel = thisDoc.activeLayer.groupItems;

    for (i = 0; i<>

    If (artSel [i] .hidden == false) {}

    var text = .textFrames artSel [i];

    for (j = 0; j<>

    text [j].textRange.characterAttributes.fillColor = newCMYKColor;

    }

    }

    End to change the rest of the outside groups text boxes.

    var textArtRange = app.activeDocument.activeLayer.textFrames;

    for (k = 0; k<>

    If (textArtRange [k] .hidden is false)

    textArtRange [k].textRange.characterAttributes.fillColor = newCMYKColor

    }

    on the other

    Alert ("it is not any open documents to change...");

  • activation and deactivation of the button in the block record multi

    Hi all
    I use
    Forms [32 bit] Version 6.0.8.24.1 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    I have a multi record block each block contains a button (the button is to approve the record in terms of change of status)
    I have elements such as the date, remarks and button
    the button should be enabled if the remarks is not null in the case otherwise it should be disabled.
    I wrote to this effect in the pre-record trigger
    if :record is null then
       set_item_property('button',enabled,property_false);
    else
          set_item_property('button',enabled,property_false);
    end if;
    What problem is enable and disable has repercussions on all the buttons in the block. in other words, if the remarks of the first record is null then all records button is disabled. If the observations of the first record column is not null, then all the records in the column of buttons is enabled.
    I have to enable and disable the button for the corresponding record.that ways if the remarks of the first record column is not null not so only records first button should be activated and others should be disabled.

    Thank you...

    Hello

    but I'm not able to do.

    You can find the current record Y_POS 
    

    This means that whatever the user record navigates according to whether the button position gets her past set.but not.
    for example the user navigates up to the fourth record that will settle the position of the button but if user navigates back to the first record. the position of the button is going to the fifth record?

    V_ITEM_Y_POS: = GET_ITEM_PROPERTY ("NOM_ELEMENT", Y_POS);

    Please note that do not use the button element to get the Y_POS.
    This should be another element in the block, then button as a buttons position will continue to change on
    What you are to get the Y_POS of button which is the fourth position of the record for the first time so, it is fair,
    second time you set Y_POS button which is 4th record + first recording which is the fifth album,.
    you need to find is the Y_POS from a fixed point in the block.

    in your description what do you mean by top_record. Why I ask, is because it is multi record block(showing_10_records).so will appear every 10. no record may be hiding.

    Top of page record is the first record in the block.
    For example, in a record 10 block, if there are 20 records then if you navigate the records, if you go to the 11th, 12th, 13th, 14th... the other then your TOP_RECORD be record No 2, 3, 4,... is the first record that is displayed in the block that is not always 1, and will be 1 only for the first 10 rcords.
    If we use: system.cursor_record we will not be able to get the Y_POS exact numbers of superior record then 10 which will put the button located under the last (10th) record, which is not what we want, so need to find the TOP_RECORD.

    Best regards

    Arif Khadas

  • check the entry of duplicate data in the block record multi, which is a required field

    Hi all
    I have a situation where I have to check duplicate data entry (on a domain, which is a field, i.e. mandatory. it cannot be ignored by the user without entering a value) in key-in data in a Multi Record block.

    With regard to the reference I used logic, such as
    1 > trigger in a when-validate-Record of this block I assign the value of the current element in the variable of type array (collection type)
    as this trigger every time I leave this record, so its by assigning the value of the current time. And this process continues

    then
    2 > wrote in a when-validate-item trigger of the corresponding element (i.e., the relaxation is at the element level), where he compares the value of the current item and the value stored in the variable of type table trigger when-validate-Record (type of collection). If the value of the current element is mapped to a value stored in the variable of type table I shows following message ("Duplicate Record") raise_form_trigger default


    This code works very well for the double value of this record multi field check

    The problem is that if the user enters the value of this field and then go to the next field, enter the value in this field, and then press 'Enter Query' icon, Validate bolt trigger fires. As a result first when - validate record fires, that stores this value, and then when-validate-point fire, so it shows message duplicate record


    Please give me a code or a logical sense to solve this problem



    Any other logic to solve this problem is also welcome

    If you query the data and it shows two unique values in the block, then it should work as expected. But if you don't ask and just open form and try to insert the record and then for the first record it does not display this message of duplication. For this, you can write your own query to check the duplication of table.

    For the image of the form, you can use any image download site. A search on google.

    -Clément

  • Avoid words / phrases from breaking apart in several blocks of type?

    When I open an indesign file exported per share, or open a PDF in Illustrator; almost take the phrases or words will become separate type blocks. They will be in the correct position, but be a letter or several letter blocks. Is it possible to avoid this?

    N °

    This is because the PDF or Postscript file format does not support the features of layout of the Illustrator within a single object. Each line of text is an object, that is anywhere where kerning has occurred, drum - this automatic kerning and build in the cast.

    You can select all text objects, then paste them into a newly created text block. You will probably need to add spaces where the line formerly ends and returns t the purpose of paragraphs.

  • Selection of Multi block record values

    Hello
    Nice day!

    Senario:

    I have a block (age_file) that have A DB colum, colum b (point DB), X (not db) the box colum... I have 1000000 folders inside...

    Block (age_file)
    Colum (part of DB) colum b (point DB)
    ABC 123
    XYZ 456
    ERT 852

    The requirement is if I select records with the help of the box, the corresponding value in the column should be concatenated and value should present in colum X (not db) , IE, if I select registration 1 & 3, the value in the column X (not db) should be abcert

    Please help me in this as soon as possible.

    Thanks in advance

    Hai,

    Try this code.

    DECLARE
         Str_Result VARCHAR2(30000);
         Num_Total_Records NUMBER;
         Num_Loop_I NUMBER;
    BEGIN
         Str_Result := '';
         GO_BLOCK('');
         FIRST_RECORD;
         LAST_RECORD;
         Num_Total_Records := TO_NUMBER(NAME_IN('SYSTEM.CURSOR_RECORD'));
         FIRST_RECORD;
         FOR Num_Loop_I IN 1..Num_Total_Records LOOP
              IF :. = 1 THEN
                   Str_Result := Str_Result || '' || :. || '' || :.;
              END IF;
              NEXT_RECORD;
         END LOOP;
         FIRST_RECORD;
    
    END;
    

    Kind regards

    Manu.

    If this answer is useful or appropriate, please mark. Thank you.

  • Why several AppleID records in the keychain?

    I have several pairs of folders in my keychain for my AppleID and wonder why.

    Maybe because you use Apple ID in different places?

    1. the present forum

    2 app Store

    3 iTunes Store

    4 iCloud

    5. etc...

  • Problem when running of several blocks of entire function

    Hello

    I'm building a great system/function using LabVIEW. Therefore, to practice and make look it tidy, I create a VI of blocks to separate and combine certain functions. But, my problem is when I did, the simulation seems to work really slow and the results are different compared to when I had the whole function/system in a single block.

    For your information, every VI blocks that I created has a loop control and simulation. When I have all interconnected, I put them all in another loop control and simulation, because some functions that I use to connect them together could not be used without the loop.

    Wondering if having a loop control and simulation in every block contributes effectively to this problems as each loop will run depends on the number of time that I put in the loop.

    If it doesn't matter which method to avoid this problem happen? My system/function looks terribly messy and it will be difficult for me to present no later than at the end of my project.

    Thank you.

    Hello

    I think what you are trying to achieve is to use simulation subsystem functionality. This allows the functions to execute outside a loop of simulation so that you can create a Subvi. After selecting the functions in your simulation loop you would like to be in a Subvi, select Edit» create Simulation subsystem. Let me know if that helps!

    Also, here is some information for this: http://zone.ni.com/reference/en-XX/help/371894E-01/lvsimhowto/sim_h_subsyssa/

    -Zach

Maybe you are looking for

  • ScanJet G4050: Desktop unable to see the drivers for Scanjet G4050

    I have a ScanJet G4050 that I can't make it work with my desktop computer (HP ENVY 700 - 210xt CTO desktop PC). The Office seems to think that there are no drivers for the device. I've recently updated for Windows 10 of 8.1. I had not connected the s

  • declaring status give invalid refnum

    I use function notifier to stop parallel mutiple loops.but found to know the reporting State always gives the value false and copied invalid refnum on probe. Please find image and attached a file for more details. How can I solve this problem.

  • T530 head phone jack

    Today, my head phone jack was wrong in the head phone jack. He's not at halfway, others have tried also. It's an easy thing to replace? Thanks in advance. D.

  • hotmail bar insert does not

    the insertion on the hotmail bar does not work, it is impossible to activate the attachments icon

  • Webcam not shown

    When I installed windows 7 my webcam does not work.