OpenOffice.org Basicでガントチャート
OpenOffice.org Basicを使ってガントチャート作成用マクロ ガントチャートforOOoを開発する手順を紹介していきます。
スポンサーサイト
上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。
プロパティ編集ダイアログ その1

ここでも、これまで同様IDEにて、ダイアログを追加して名称を「dlgEditProperty」とし、必要なコントロールを配置します。
各コントロールを配置したダイアログは下図となります。


次に、モジュールを追加して名称を「mdlEditProperty」とします。そして、ダイアログに配置したコントロール用の変数を宣言します。

Private oDialog As Object
 
Private txtSheetName As Object
Private txtBeginDate As Object
Private cmbCellUnit As Object
Private txtDrawRows As Object
Private scbChartBarWeight As Object
Private lblSheetName As Object
Private lblBeginDate As Object
Private lblCellUnit As Object
Private lblDrawRows As Object
Private lblChartBarWeight As Object
Private lblChartBarPlanPos As Object
Private lblChartBarActPos As Object
Private lblChartBarType As Object
Private lblChartBarPlanLineColor As Object
Private lblChartBarPlanFillColor As Object
Private lblChartBarActLineColor As Object
Private lblChartBarActFillColor As Object
Private lblChartHolidayColor As Object
Private scbChartBarPlanPos As Object
Private scbChartBarActPos As Object
Private cmbChartBarType As Object
Private imgChartBarPlanLineColor As Object
Private imgChartBarPlanFillColor As Object
Private imgChartBarActLineColor As Object
Private imgChartBarActFillColor As Object
Private imgChartHolidayColor As Object
Private lblProgressLineWeight As Object
Private chkDrawProgressLine As Object
Private scbProgressLineWeight As Object
Private imgProgressLineColor As Object
Private lblMileStoneWeight As Object
Private scbMileStoneWeight As Object
Private chkPrintAllItems As Object
Private chkPrintNotCompleted As Object
Private chkInsertSpaceBetweenCategory As Object
Private btnOK As Object
Private chkPrintLabel As Object
Private chkCalculateStatus As Object
Private chkCalculateTimesWithoutHoliday As Object
Private chkUseOptionalNote As Object
Private txtChartBarWeight As Object
Private txtChartBarPlanPos As Object
Private txtChartBarActPos As Object
Private txtProgressLineWeight As Object
Private txtMileStoneWeight As Object
Private lblCategorizeType As Object
Private lstCategorizeType As Object
 
Public dlgEditProperty_cmbChartBarType_Items
Public dlgEditProperty_cmbCellUnit_Items
Public dlgEditProperty_lstCategorizeType_Items
 
Public dlgEditProperty_lblSheetName_Text As String
Public dlgEditProperty_lblBeginDate_Text As String
Public dlgEditProperty_lblCellUnit_Text As String
Public dlgEditProperty_lblDrawRows_Text As String
Public dlgEditProperty_lblChartBarWeight_Text As String
Public dlgEditProperty_lblChartBarPlanPos_Text As String
Public dlgEditProperty_lblChartBarActPos_Text As String
Public dlgEditProperty_lblChartBarType_Text As String
Public dlgEditProperty_lblChartBarPlanLineColor_Text As String
Public dlgEditProperty_lblChartBarPlanFillColor_Text As String
Public dlgEditProperty_lblChartBarActLineColor_Text As String
Public dlgEditProperty_lblChartBarActFillColor_Text As String
Public dlgEditProperty_lblChartHolidayColor_Text As String
Public dlgEditProperty_lblProgressLineWeight_Text As String
Public dlgEditProperty_lblMileStoneWeight_Text As String
Public dlgEditProperty_lblCategorizeType_Text As String
 
Public dlgEditProperty_chkDrawProgressLine_Label As String
Public dlgEditProperty_chkPrintAllItems_Label As String
Public dlgEditProperty_chkPrintNotCompleted_Label As String
Public dlgEditProperty_chkInsertSpaceBetweenCategory_Label As String
Public dlgEditProperty_chkPrintLabel_Label As String
Public dlgEditProperty_chkCalculateStatus_Label As String
Public dlgEditProperty_chkCalculateTimesWithoutHoliday_Label As String
Public dlgEditProperty_chkUseOptionalNote_Label As String
Public dlgEditProperty_btnOK_Label As String

これほど大量の変数を宣言するとなるとなかなか大変なので、以前作成したダイアログ作成サポートダイアログを使用するととても楽になります。

そして、mdlMain.Initialize関数に下記を追加します。

dlgEditProperty_lblSheetName_Text = ControlLabelString("シート名")
dlgEditProperty_lblBeginDate_Text = ControlLabelString("開始日")
dlgEditProperty_lblCellUnit_Text = ControlLabelString("セル単位")
dlgEditProperty_lblDrawRows_Text = ControlLabelString("描画行数")
dlgEditProperty_lblChartBarWeight_Text = ControlLabelString("線幅")
dlgEditProperty_lblChartBarPlanPos_Text = ControlLabelString("開始線位置")
dlgEditProperty_lblChartBarActPos_Text = ControlLabelString("実績線位置")
dlgEditProperty_lblChartBarType_Text = ControlLabelString("線の種類")
dlgEditProperty_lblChartBarPlanLineColor_Text = _
    ControlLabelString("予定線色")
dlgEditProperty_lblChartBarPlanFillColor_Text = _
    ControlLabelString("予定塗色")
dlgEditProperty_lblChartBarActLineColor_Text = _
    ControlLabelString("実績線色")
dlgEditProperty_lblChartBarActFillColor_Text = _
    ControlLabelString("実績塗色")
dlgEditProperty_lblChartHolidayColor_Text = _
    ControlLabelString("休日塗色")
dlgEditProperty_lblProgressLineWeight_Text = _
    ControlLabelString("進捗線幅")
dlgEditProperty_lblMileStoneWeight_Text = _
    ControlLabelString("マイルストーン")
dlgEditProperty_lblCategorizeType_Text = _
    ControlLabelString("分類形式")
dlgEditProperty_chkDrawProgressLine_Label = _
    ControlLabelString("進捗線を描画する")
dlgEditProperty_chkPrintAllItems_Label = _
    ControlLabelString("工程期間外の項目を含めて表示する")
dlgEditProperty_chkPrintNotCompleted_Label = _
    ControlLabelString("未完の項目を必ず表示する")
dlgEditProperty_chkInsertSpaceBetweenCategory_Label = _
    ControlLabelString("分類の間に空白を入れる")
dlgEditProperty_chkPrintLabel_Label = _
    ControlLabelString("工程の名称を表示する")
dlgEditProperty_chkCalculateStatus_Label = _
    ControlLabelString("進捗を実績から計算する")
dlgEditProperty_chkCalculateTimesWithoutHoliday_Label = _
    ControlLabelString("休日を除いた作業量を求める")
dlgEditProperty_chkUseOptionalNote_Label = _
    ControlLabelString("追加の備考を使用する")
dlgEditProperty_btnOK_Label = ControlLabelString("設定")
 
dlgEditProperty_cmbChartBarType_Items = array("長方形","直線")
dlgEditProperty_cmbCellUnit_Items = array("1日","7日","10日","1月")
dlgEditProperty_lstCategorizeType_Items = array("分類","担当者")
スポンサーサイト

テーマ:OpenOffice.org - ジャンル:コンピュータ

コメント
この記事へのコメント
コメントを投稿する
URL:
Comment:
Pass:
秘密: 管理者にだけ表示を許可する
 
トラックバック
この記事のトラックバックURL
http://shinob.blog42.fc2.com/tb.php/106-23f6578f
この記事にトラックバックする(FC2ブログユーザー)
この記事へのトラックバック
COPYRIGHT(C) 2004 POWERD BY FC2 ALLRIGHT RESERVED.
上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。