Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.02.27;
Скачать: CL | DM;

Вниз

Как в RichEdit загрузить файл DOS формата?   Найти похожие ветки 

 
Alex31   (2005-02-13 17:19) [0]

Здравствуйте уважаемые мастера!
Как в RichEdit загрузить файл DOS формата?
Метод LoadFromFile() грузит одни иероглифы ...:( помогите плиз..


 
Юрий Зотов ©   (2005-02-13 17:31) [1]

TStringStream.LoadFromFile + OemToChar + LoadFromStream.


 
Alex31   (2005-02-13 17:50) [2]

Спасибо, помогло  OemToChar!!!
А еще вопросик...  метод SaveToFile тоже работает криво...как тут быть?


 
Kerk ©   (2005-02-13 18:03) [3]

Alex31   (13.02.05 17:50) [2]
CharToOem видимо


 
Alex31   (2005-02-13 18:11) [4]

2 Kerk ©   (13.02.05 18:03) [3]

А вот не выходит почему-то....
вот код:

procedure TForm1.Button1Click(Sender: TObject);
var s: string;
begin
  if SaveDialog1.Execute then
  begin
     s:=RichEdit2.Text;
     CharToOem(Pchar(s),Pchar(s));
     RichEdit2.Text:=s;
     RichEdit2.Lines.SaveToFile(SaveDialog1.GetNamePath);
  end;
end;


 
Kerk ©   (2005-02-13 18:22) [5]


> RichEdit2.Lines.SaveToFile(SaveDialog1.GetNamePath);

что за фигня?


 
Alex31   (2005-02-13 18:25) [6]

Kerk ©   (13.02.05 18:22) [5]
Эта фигня как раз сохраняет в файт Richedit2.text  !!!!!

А ответ на свой вопрос я уже нашел сам...!

RichEdit2.PlainText:=true;


 
Просто Джо ©   (2005-02-14 00:06) [7]


> SaveDialog1.GetNamePath


Однако...


 
Cobalt ©   (2005-02-14 03:15) [8]

Из дельфовой справки:
Description
GetNamePath is used to determine the text to display in the Object Inspector for the name of the object being edited. GetNamePath is introduced in TPersistent so descendants such as collections can appear in the Object Inspector. TComponent overrides GetNamePath to return the component’s name. Do not call GetNamePath directly.

:)



Страницы: 1 вся ветка

Текущий архив: 2005.02.27;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.044 c
1-1108013410
Atrion
2005-02-10 08:30
2005.02.27
RegKey.ReadBinaryData нужно Binary в String


1-1107877962
_student
2005-02-08 18:52
2005.02.27
Как работать с Compound Document (он же OLE Structured Storage).


3-1106903250
Oleon
2005-01-28 12:07
2005.02.27
Как в cxGrid выборочные строки выделить другим цветом?


14-1107471384
Чайник
2005-02-04 01:56
2005.02.27
Кто знает где скачать документацию PhotoshopSDK


1-1108065572
redlord
2005-02-10 22:59
2005.02.27
Tcombobox и items