محرر النصوص
#3
(24-01-2024, 08:12 PM)bibill كتب : السلام عليكم و رحمة الله :
الموضوع : كيف يمكن انشاء محرر نصوص بحيث أقوم  بالتحكم في نوع و حجم و عرض الخط ....
تقريبا مثل محرر النصوص هذا الخاص بالموقع .
بحيث أحفظ الملف RTF

السلام عليكم 

جرب:
كود :
procedure TForm1.FormCreate(Sender: TObject); begin   // Configure the font type ComboBox with the available options   ComboBoxFont.Items := Screen.Fonts;   ComboBoxFont.ItemIndex := 0; // Default font   // Configure the font size ComboBox with the available options   ComboBoxSize.Items.Add('10');   ComboBoxSize.Items.Add('12');   ComboBoxSize.Items.Add('14');   ComboBoxSize.ItemIndex := 0; // Default size   // Configure the font width TrackBar   TrackBarWidth.Min := 1;   TrackBarWidth.Max := 10;   TrackBarWidth.Position := 5; // Default width end; procedure TForm1.ComboBoxFontChange(Sender: TObject); begin   // Apply the font type change to the RichEdit component   RichEdit1.SelAttributes.Name := ComboBoxFont.Text; end; procedure TForm1.ComboBoxSizeChange(Sender: TObject); begin   // Apply the font size change to the RichEdit component   RichEdit1.SelAttributes.Size := StrToInt(ComboBoxSize.Text); end; procedure TForm1.TrackBarWidthChange(Sender: TObject); begin   // Apply the font width change to the RichEdit component   RichEdit1.SelAttributes.Width := TrackBarWidth.Position; end; procedure TForm1.ButtonSaveClick(Sender: TObject); var   SaveDialog: TSaveDialog; begin   SaveDialog := TSaveDialog.Create(Self);   try     SaveDialog.Filter := 'RTF Files|*.rtf';     if SaveDialog.Execute then       RichEdit1.Lines.SaveToFile(SaveDialog.FileName);   finally     SaveDialog.Free;   end; end;
الخوف من أي محاولة جديدة طريق حتمي للفشل.
الرد


الردود في هذا الموضوع
محرر النصوص - بواسطة bibill - 24-01-2024, 08:12 PM
RE: محرر النصوص - بواسطة Ndagor - 25-01-2024, 10:25 AM
RE: محرر النصوص - بواسطة wadoud - 27-01-2024, 03:29 AM
RE: محرر النصوص - بواسطة bibill - 03-02-2024, 09:25 AM
RE: محرر النصوص - بواسطة larbiparadox - 03-02-2024, 09:54 AM
RE: محرر النصوص - بواسطة bibill - 03-02-2024, 10:06 AM
RE: محرر النصوص - بواسطة larbiparadox - 03-02-2024, 02:13 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم