Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 07-16-2003, 04:19 PM
dirso dirso is offline
Senior Member
 
Join Date: Mar 2001
Posts: 441
Default DBNavigator

Hi,

I made a TDBNavigator descendent class that can be vertical too, but its width is 200 mininum, even if i rewrte the CalcMinSize function. Does anyone know what should i do?

Thank u very much,
Dirso
Reply With Quote
  #2  
Old 07-16-2003, 10:55 PM
kalifat kalifat is offline
Senior Member
 
Join Date: Apr 2003
Posts: 623
Default RE: DBNavigator

It isn't simple because TDBNavigator has private property MinBtnSize (type TPoint), and procedure InitButtons set this property on MinBtnSize:=Point(20,18);

1.
If you want change it you have to change values into InitButtons and rebuild all DBCtrls library.
2.
The simplest will be add dbcrtls.pas to your project, change parameter MinBtnSize and create DBNavigator in run time
var YourNavigator:TDBNavigator;
begin
YourNavigator:=TDBNavigator.Create(Form1);
YourNavigator.VisibleButtons:=[nbFirst,nbNext,nbDelete];

.....
.....
YourNavigator.Destroy;
end;

3.
Because you have all (10) visible buttons Delphi set minimal width on 20*10=200 (CalcMinSize calculate this value).
Maybe you don't have to use all buttons - > f.e 5*20=100


<cr>Accept if it helps</cr>
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:01 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.