Page 1 of 1

SI Dialogs and Control Widths

Posted: Sat Apr 26, 2003 12:08 pm
by ozmosys
Hi Guys,

I am using the SI Dialogs in my application, and have the following question ..

What can I do if the translation is wider than will fit on the dialog control? fex the Find Dialog button "Find Next" in Dutch is "Zoek Volgende", and will not fit on the button given its existing width. Can I do anything about this? (I know I can shorten the translation, but this is not the preferred solution)

Best regards

Steve

Posted: Sat Apr 26, 2003 5:07 pm
by isiticov
Unfortunately, there is no easy way to do this. But may be you can hack this by writing something like this in OnShow event of for example siFindDialog:

procedure TForm1.siFindDialog1Show(Sender: TObject);
var
hnd: THandle;
R: TRect;
begin
if (siFindDialog1.siLang = nil) or (siFindDialog1.siLang.Language <> 'Dutch') then Exit;
GetWindowRect(siFindDialog1.Handle, R);
SetWindowPos(siFindDialog1.Handle, 0, 0, 0, R.Right - R.Left + 26, R.Bottom - R.Top, SWP_NOMOVE or SWP_NOZORDER);
hnd := GetDlgItem(siFindDialog1.Handle, 1);
SetWindowPos(hnd, 0, 0, 0, 100, 23, SWP_NOMOVE or SWP_NOZORDER);
hnd := GetDlgItem(siFindDialog1.Handle, IDCANCEL);
SetWindowPos(hnd, 0, 0, 0, 100, 23, SWP_NOMOVE or SWP_NOZORDER);
end;