diff options
Diffstat (limited to 'examples/apps/uidesigner/newformdesigner.pas')
-rw-r--r-- | examples/apps/uidesigner/newformdesigner.pas | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/apps/uidesigner/newformdesigner.pas b/examples/apps/uidesigner/newformdesigner.pas index 8a96997c..6cd7e687 100644 --- a/examples/apps/uidesigner/newformdesigner.pas +++ b/examples/apps/uidesigner/newformdesigner.pas @@ -453,13 +453,15 @@ var s: string; i: integer; begin + i := -1; if TwgPaletteButton(Sender).Down then begin s := TwgPaletteButton(Sender).VFDWidget.WidgetClass.ClassName; - chlPalette.FocusItem := chlPalette.Items.IndexOf(s); + i := chlPalette.Items.IndexOf(s); end; - if chlPalette.FocusItem = -1 then - chlPalette.FocusItem := 0; + if i = -1 then + i := 0; // select the '-' item + chlPalette.FocusItem := i; end; { TfrmProperties } |