SI Dialogs and Control Widths

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
ozmosys
Posts: 9
Joined: Sun Mar 02, 2003 7:12 am
Location: Melbourne, Australia
Contact:

SI Dialogs and Control Widths

Post 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
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post 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;
Post Reply