From 75ea0d89e62348f8e7a4dd58b501ef7a1a5b629f Mon Sep 17 00:00:00 2001 From: Hernan Morales Durand <4825959+hernanmd@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:12:57 +0100 Subject: [PATCH] Add helper method to setup the filtering list header title --- .../SpFilteringListPresenter.class.st | 7 +++++++ .../SpFilteringListPresenter.extension.st | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Spec2-CommonWidgets/SpFilteringListPresenter.class.st b/src/Spec2-CommonWidgets/SpFilteringListPresenter.class.st index bcd706f1..20f169aa 100644 --- a/src/Spec2-CommonWidgets/SpFilteringListPresenter.class.st +++ b/src/Spec2-CommonWidgets/SpFilteringListPresenter.class.st @@ -141,6 +141,13 @@ SpFilteringListPresenter >> filterText [ ^ self filterInputPresenter text ] +{ #category : 'api' } +SpFilteringListPresenter >> headerTitle: aString [ + "Set the receiver's header title to aString" + + listPresenter headerTitle: aString +] + { #category : 'initialization' } SpFilteringListPresenter >> initializePresenters [ diff --git a/src/Spec2-Examples/SpFilteringListPresenter.extension.st b/src/Spec2-Examples/SpFilteringListPresenter.extension.st index 22a87108..2445118c 100644 --- a/src/Spec2-Examples/SpFilteringListPresenter.extension.st +++ b/src/Spec2-Examples/SpFilteringListPresenter.extension.st @@ -6,11 +6,11 @@ SpFilteringListPresenter class >> example [ | example | example := self new. - example items: RBBrowserEnvironment default classes asArray. - example open. - example withWindowDo: [ :window | - window title: self name asString , ' example' ]. - + example + items: RBBrowserEnvironment default classes asArray; + headerTitle: 'Classes'; + open; + withWindowDo: [ :window | window title: self name asString , ' example' ]. ^ example ]