SetCurtainProperties

 

Purpose: Set the properties of the curtains.  A curtain is used to shade a date range on the schedule.

 

Returns: none

 

Argument  

Type

Required

Purpose

1

Integer

Yes

Curtain number, 1 based (must already exist)

2

Variant

Yes

Start Date/Time

3

Variant

Yes

End Date/Time

4

Integer

Yes

Curtain pattern Color  

5

Integer

Yes

Curtain background Color   

6

Integer

Yes

Curtain fill patterns (1-27)

7

Integer

Yes

Curtain border 1: border 0: no border

8

String

No

Curtain name (so that it can be referred to by .SetTaskLineCurtain method)

If argument 8 is included, but it is a zero length string or a string with a blank in the first character, then the name, if any, is removed.

 

Example: Add 4 curtains and set properties

 

 

Public Sub Addcurtain(objmilestones As Object)

        With objmilestones

            .Activate()

            .allcolorsarergb()

            .SetStartAndEndDates("01/01/2024", "06/30/2025")
            .refresh()

            'set up curtains

            .setmiscproperty("ShowCurtainsOverHorzGridlines", 1)

            'Curtain 1
            .AddCurtain("1/1/2024", "1/15/2024")

            'Curtain 2
            .AddCurtain("1/1/2024", "1/15/2024")

            'Curtain 3
            .AddCurtain("4/8/2024", "4/15/2024")

            'Curtain 4
            .AddCurtain("2/1/2025", "2/15/2025")

            ' Set Curtain Properties(Curtain number, start date, end date, pattern color, background color, fill patterns (1-27), border, curtain name (optional), Curtain Label)
            .SetCurtainProperties(1, "1/1/2024", "1/15/2024", RGB(255, 0, 0), RGB(0, 0, 0), 1, 0, "Red","My Curtain")


            .SetCurtainProperties(2, "2/1/2024", "2/22/2024", RGB(0, 255, 0), RGB(0, 0, 0), 1, 0, "Green")

            'skyblue and gold boxes
            .SetCurtainProperties(3, "4/8/2024", "6/15/2024", RGB(153, 204, 255), RGB(255, 204, 0), 14, 0)

            'black and yellow smiley faces
            .SetCurtainProperties(4, "2/1/2025", "3/15/2025", RGB(0, 0, 0), RGB(255, 255, 0), 8, 0)

            .settasklinecurtain(1, 1, "red", "3/1/2024", "6/30/2024")

            .settasklinecurtain(1, 2, "green", "8/1/2024", "4/30/2025")

            .Refresh()


        End With


        Exit Sub


    End Sub

 

 

 

 

 

Related Topics

  1. AddCurtain
  2. SetTaskLineCurtain
  3. SetMiscProperty

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To effectively program with this interface, it's important to learn all about Milestones Professional.  Learn about Milestones.

Milestones Professional 2025 Automation Methods and Properties.  © Copyright 2000-2025, KIDASA Software, Inc. All rights reserved.