bug? reload RVF SRVCombobox control height changed

General TRichView support forum. Please post your questions here
Post Reply
chuqingsheng
Posts: 38
Joined: Sat Nov 06, 2010 5:12 am

bug? reload RVF SRVCombobox control height changed

Post by chuqingsheng »

I insert SRVCombobox into RVF doc and set the srvcombobox control height with new value(< default value) . save it . but the control height changed after reload this rvf doc.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Did you set SRVComboBox.Autosize = False?
chuqingsheng
Posts: 38
Joined: Sat Nov 06, 2010 5:12 am

Post by chuqingsheng »

Sergey Tkachenko wrote:Did you set SRVComboBox.Autosize = False?
Yes.

Code: Select all

procedure TfrmAppMain.InsertComboboxControl(RVEdit: TCustomRichViewEdit; ctrlname: string; ItemWidth: Integer; Items: TStrings);
var
  c_combobox: TSRVComboBox;
  i, w: Integer;
begin
  c_combobox := TSRVComboBox.Create(nil);
  c_combobox.Name := ctrlname;

  c_combobox.DropDownCount := 12;
  c_combobox.AutoSize := False; 
  c_combobox.Width := ItemWidth;
  c_combobox.Height := 15;
  c_combobox.AutoDropDown := True;
  c_combobox.Style := csDropDownList;
  c_combobox.Font.Size := 9;
  c_combobox.Edit.Font.Assign(c_combobox.Font);
  c_combobox.Parent := RVEdit;
  w := 0;
  for i := 0 to Items.Count - 1 do
  begin
    c_combobox.Items.Assign(Items);
  end;


  RVEdit.InsertControl(ctrlname, c_combobox, rvvaAbsTop);
  c_combobox.Update;
end;
[/code]
chuqingsheng
Posts: 38
Joined: Sat Nov 06, 2010 5:12 am

Post by chuqingsheng »

Dear Sergey, have any suggest?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I cannot reproduce this problem.
I tested in the InsertControl demo: added the code:

Code: Select all

c.Autosize := False;
c.Height := 5;
When copy-pasting a combobox (it must be the same as loading), it is inserted with the same height, 5 pixels.
(however, there is a glitch in redrawing after pasting, it disappears after mouse movement, we will fix it)

May be you use an old version of ScaleRichView?
chuqingsheng
Posts: 38
Joined: Sat Nov 06, 2010 5:12 am

Post by chuqingsheng »

I use the last release version ,
I mean after load then rvf doc, not copy. I use srichviewedit.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I saved the document using the same demo (Demos\Controls\InsertControls\), and it is loaded correctly (except for the above mentioned drawing glitch)
Post Reply