Bladeren bron

Using path word-breaking for "file" extension options

Source commit: d24aae2b700a008c602dc63e61f970eb63af4b83
Martin Prikryl 9 jaren geleden
bovenliggende
commit
f2f8fdae31
1 gewijzigde bestanden met toevoegingen van 22 en 0 verwijderingen
  1. 22 0
      source/forms/Custom.cpp

+ 22 - 0
source/forms/Custom.cpp

@@ -843,6 +843,7 @@ public:
 
 protected:
   virtual void __fastcall DoHelp();
+  DYNAMIC void __fastcall DoShow();
 
 private:
   const TCustomCommandType * FCommand;
@@ -1214,6 +1215,27 @@ void __fastcall TCustomCommandOptionsDialog::DoHelp()
   }
 }
 //---------------------------------------------------------------------------
+void __fastcall TCustomCommandOptionsDialog::DoShow()
+{
+  TCustomDialog::DoShow();
+
+  int ControlIndex = 0;
+  for (int OptionIndex = 0; OptionIndex < FCommand->OptionsCount; OptionIndex++)
+  {
+    const TCustomCommandType::TOption & Option = FCommand->GetOption(OptionIndex);
+
+    if ((Option.Flags & FFlags) != 0)
+    {
+      if (Option.Kind == TCustomCommandType::okFile)
+      {
+        TControl * Control = FControls[ControlIndex];
+        InstallPathWordBreakProc(DebugNotNull(dynamic_cast<TWinControl *>(Control)));
+      }
+      ControlIndex++;
+    }
+  }
+}
+//---------------------------------------------------------------------------
 bool __fastcall DoCustomCommandOptionsDialog(
   const TCustomCommandType * Command, TStrings * CustomCommandOptions, unsigned int Flags)
 {