ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Colouring the DDS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Colouring the DDS

    Hi Everybody,

    Can anybody tell me how we can give reverse immage,underline or change colour of DDS.

    Thanks & waiting for ur reply.

  • #2
    Re: Colouring the DDS

    example when *in40 = *on this field is reverse image and the cursor is positioned within

    PHP Code:
    ~
         
    A            S01OPTN        1A  B  9  3
         A  40                                  DSPATR
    (RI)
         
    A  40                                  DSPATR(PC
    This field is blue

    PHP Code:
    ~
         
    A                                  1 71USER
         A                                      COLOR
    (BLU

    This field is underlined and white
    PHP Code:
    ~
         
    A                                  8  2'Opt'
         
    A                                      DSPATR(UL)
         
    A                                      COLOR(WHT
    Look here for more

    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: Colouring the DDS

      or even here

      Comment


      • #4
        Re: Colouring the DDS

        You can also do it dynamicaly.
        I use a table for colors;

        PHP Code:
         Color                      Hex   
        Code  Description          Aplha 
        B     Blue                 3A    
        BR    Blue Reverse         3B    
        BU    Blue UnderLine       3E    
        CR    Cyan Reverse         31    
        CU    Cyan Underline       34    
        GR    Green Reverse        21    
        GU    Green Underline      24    
        P     Pink                 38    
        PR    Pink Reverse         3D    
        PU    Pink Underline       3C    
        R     Red                  28    
        RR    Red Reverse          29    
        RU    Red Underline        2C    
        W     White                22    
        WR    White Reverse        23 
        WU    White Underline      26 
        YR    Yellow reverse       33 
        YU    Yellow Underline     36 
        Then I color the screen variable depending on what the user wanted it to be.

        PHP Code:
          // Color the store                                 
        Chain (Sf_StoreModIdx;                           
        If %
        FOUND(ModIdx);                                 
            %
        SubSt(Sf_StoreA:02:05) = %EDITC(Sf_Store:'Z');
            %
        SubSt(Sf_StoreA:01:01) = Mod_Color(M3Modl);   
        Else;                                              
            %
        SubSt(Sf_StoreA:02:05) = %EDITC(Sf_Store:'Z');
            %
        SubSt(Sf_StoreA:01:01) = yellow;              
        EndIf; 
        The first character holds the hex and the rest hold the value.
        Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

        Comment


        • #5
          Re: Colouring the DDS

          Are you talking about coloring the screen displays or the source code?

          If you edit the source code using lpex or CODE, it is colored automatically.

          Comment


          • #6
            Re: Colouring the DDS

            Does no one use SDA these days?

            Comment


            • #7
              Re: Colouring the DDS

              CODE Designer still needs improvement, but it so far ahead of SDA.

              I haven't used SDA in years.

              Comment


              • #8
                Re: Colouring the DDS

                Using SDA....


                Type in strsda on the command line...

                then u get the following screen..


                Type choices, press Enter.

                Source file . . . . . . . . QDDSSRC Name, F4 for list

                Library . . . . . . . . . testusr Name, *LIBL, *CURLIB

                Member . . . . . . . . . . PRJMNT1D Name, F4 for list













                F3=Exit F4=Prompt F12=Cancel


                PRess Enter here..then select the record format that you wanted to color fields in , by taking option 12(for design image)

                then put a * next to the field you want to change its attributes to..and press enter.....(to highlight or change color)

                DD/DD/DD OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO UUUUUUUUUU
                TT:TT:TT Project Maintenance SSSSSSSS

                Maintain Project information, Press <ENTER> to assign Project number
                Status . . . OOOOOOOOOOOOOOO Create Aldon Project . . . . : B
                Project Number . . . . . :*OOOOOO
                Project Catagory . . . . : BBBBBBBBBB + OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
                Priority . . . . . . . . : 99
                Department . . . . . . . : BBBBB + OOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
                Requested By . . . . . . : BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
                Notes . . . . . . . . . : BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
                BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
                BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
                BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB


                On the following screen type in Y for 'Display attributes' and 'Colors' and then pick your options..



                Field . . . . . : S1PROJECT Usage . . : O
                Length . . . . : 6 Row . . . : 6 Column . . . : 29

                Type choices, press Enter.
                Y=Yes For Field Type
                Display attributes . . . . . . . Y All except Hidden
                Colors . . . . . . . . . . . . . Y All except Hidden




                General keywords . . . . . . . . All types

                Database reference . . . . . . . Hidden, Input, Output, Both
                Error messages . . . . . . . . . Input, Output, Both
                Message ID (MSGID) . . . . . . . Output or Both


                TEXT keyword . . . . . . . . . .


                F3=Exit F4=Display Selected Keywords F12=Cancel


                then exit out of that using F3, but be sure to save the display file when you exit...

                Recompile and then you will have the new fields with changed attributes..

                - sg

                Comment

                Working...
                X