Registriert seit: 8. Jun 2009
Ort: Bayern
1.138 Beiträge
Delphi 11 Alexandria
|
DELPHI XE2 TButtonSet verschwunden
8. Nov 2011, 11:16
unter DBCtrls gibt es in meinem DELPHI XE2 keine Klasse TButtonSet mehr .... richtig ?
dh. mein Code zum reduzieren der Buttons bei Bedarf geht nicht mehr
Delphi-Quellcode:
type
TNavigatorButtonSet = (nbsFull, nbsPartial, nbsRefreshOnly);
TDBShortNavigator = Class(TDBNavigator)
private
{ .... }
FButtonSet: TNavigatorButtonSet;
procedure SetButtonSet(const value: TNavigatorButtonSet);
protected
{ .... }
public
{ ..... }
published
{ .... }
property ButtonSet: TNavigatorButtonSet read FButtonSet write SetButtonSet;
end;
procedure register;
implementation
///
/// register the extended navigator buttons
///
procedure register;
begin
RegisterComponents('TOOLS', [TDBShortNavigator]);
end;
///
/// How should Navigator button look like
///
procedure TDBShortNavigator.SetButtonSet(const value: TNavigatorButtonSet);
const
FULL_SET = [nbFirst, nbPrior, nbNext, nbLast, nbInsert, nbDelete, nbEDit,
nbPOst, nbCancel, nbRefresh];
PARTIAL_SET = [nbFirst, nbPrior, nbNext, nbLast];
REFRESH_SET =[nbRefresh];
SETS: Array [TNavigatorButtonSet] of TButtonSet = (FULL_SET, PARTIAL_SET, REFRESH_SET);
begin
if (FButtonSet = value) then
exit; // no need to do anything
FButtonSet := value;
VisibleButtons := SETS[FButtonSet];
end;
Geändert von SirThornberry ( 8. Nov 2011 um 13:24 Uhr)
Grund: Delphi-Tags ergänzt - nächstes mal bitte selbst die Delphi-Tags setzen.
|
|
Zitat
|