достала "борьба" с лазарем решил отвлечься на мсе.
вот че получилось.
Модератор: Модераторы
procedure tmainfo.on_popup_edit(const sender: TObject; var amenu: tpopupmenu;
var mouseinfo: mouseeventinfoty);
begin
tpopupmenu1.menu[0].Caption := simpletext.selectedtext;
amenu := tpopupmenu1;
end;
procedure tmainfo.on_update_tpopupmenu1(const sender: tcustommenu); //MSE
begin
sender.menu[0].caption := simpletext.selectedtext;
end;
procedure tmainfo.on_change_spin(const sender: TObject);
begin
// simpletext.font.height := strtoint(trealspinedit1.text); MSE
simpletext.font.height := trealspinedit1.asinteger; //better MSE
end;
procedure tmainfo.on_setvalue_spin(const sender: TObject; var avalue: realty;
var accept: Boolean);
begin
simpletext.font.height:= round(avalue); //much better MSE
end;
procedure tmainfo.on_setintvalue_spin(const sender: TObject;
var avalue: Integer; var accept: Boolean);
//best, needs MSEide+MSEgui git master, MSE
//onsetintvalue was not published for trealspinedit MSE
begin
simpletext.font.height:= avalue;
end;
procedure tmainfo.btn_open(const sender: TObject);
begin
if tfiledialog1.execute = mr_ok then begin
// simpletext.clear; not necessary MSE
simpletext.loadfromfile(tfiledialog1.controller.filename);
end;
end;
showed how to clean tsyntaxedit.simpletext.clear;
simpletext.font.height:= avalue;
had another idea...tpopupmenu
- activate mygrid.optionsgrid og_rowheight in order to allow variable rowhight
in different rows.
- activate mygrid.datacols[0].options1 co1_autorowheight.
- activate simpletext.textflags tf_wordbreak.
- activate simpletext.textflagsactive tf_wordbreak.
Martin
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 12