From 147983a53360f9988b7ca4c7b060a91baa82efde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sat, 11 Aug 2012 16:26:34 +0000 Subject: [PATCH] [GB.FORM] * NEW: Replace GridView.Rows.GetSelected() method by GridView.Rows. Selection property. git-svn-id: svn://localhost/gambas/trunk@5031 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- comp/src/gb.form/.info | 8 +++---- comp/src/gb.form/.lang/.pot | 24 +++++++++---------- comp/src/gb.form/.project | 2 +- .../.src/GridView/GridViewSelection.class | 10 ++++---- .../.src/GridView/_GridView_Rows.class | 12 ++++++---- 5 files changed, 29 insertions(+), 27 deletions(-) diff --git a/comp/src/gb.form/.info b/comp/src/gb.form/.info index 27a7df869..2a8db7d55 100644 --- a/comp/src/gb.form/.info +++ b/comp/src/gb.form/.info @@ -3201,6 +3201,10 @@ H p i +Selection +r +Integer[] + :_Refresh : @@ -3289,10 +3293,6 @@ _Clear m -GetSelected -m -Integer[] - #_IconPanelContainer UserControl C diff --git a/comp/src/gb.form/.lang/.pot b/comp/src/gb.form/.lang/.pot index 1ed521977..a5882c5d5 100644 --- a/comp/src/gb.form/.lang/.pot +++ b/comp/src/gb.form/.lang/.pot @@ -10,6 +10,10 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +#: .project:1 +msgid "More controls for graphical components" +msgstr "" + #: CBookmarkList.class:50 msgid "Home" msgstr "" @@ -231,10 +235,6 @@ msgstr "" msgid "Enabled" msgstr "" -#: FileView.class:89 -msgid "Last modified" -msgstr "" - #: FMain.form:24 msgid "Clear" msgstr "" @@ -255,14 +255,14 @@ msgstr "" msgid "Do not display this message again" msgstr "" -#: Form1.form:21 FSidePanel.class:939 -msgid "Transparent" -msgstr "" - #: FSidePanel.class:935 msgid "Hidden" msgstr "" +#: FSidePanel.class:939 Form1.form:21 +msgid "Transparent" +msgstr "" + #: FWizard.form:60 msgid "&Next" msgstr "" @@ -271,12 +271,12 @@ msgstr "" msgid "&Previous" msgstr "" -#: Help.module:71 -msgid "The '/' character is forbidden inside file or directory names." +#: FileView.class:89 +msgid "Last modified" msgstr "" -#: .project:1 -msgid "More controls for graphical components" +#: Help.module:71 +msgid "The '/' character is forbidden inside file or directory names." msgstr "" #: Wizard.class:77 diff --git a/comp/src/gb.form/.project b/comp/src/gb.form/.project index 236febf15..3411789c3 100644 --- a/comp/src/gb.form/.project +++ b/comp/src/gb.form/.project @@ -1,5 +1,5 @@ # Gambas Project File 3.0 -# Compiled with Gambas 3.2.0 +# Compiled with Gambas 3.2.90 Title=More controls for graphical components Startup=FMain Version=3.2.90 diff --git a/comp/src/gb.form/.src/GridView/GridViewSelection.class b/comp/src/gb.form/.src/GridView/GridViewSelection.class index b5a9bd6d4..0328cbb1e 100644 --- a/comp/src/gb.form/.src/GridView/GridViewSelection.class +++ b/comp/src/gb.form/.src/GridView/GridViewSelection.class @@ -42,12 +42,12 @@ Public Sub Select(iStart As Integer, Optional iLength As Integer = 1) If iStart >= S And If iStart <= (S + L) Then $aSel[I + 1] = iStart + iLength - S - Dump + 'Dump Return Else If (iStart + iLength) >= S And If (iStart + iLength) <= (S + L) Then $aSel[I + 1] += $aSel[I] - iStart $aSel[I] = iStart - Dump + 'Dump Return Endif @@ -55,7 +55,7 @@ Public Sub Select(iStart As Integer, Optional iLength As Integer = 1) $aSel.Add(iStart) $aSel.Add(iLength) - Dump + 'Dump End @@ -91,14 +91,14 @@ Public Sub UnSelect(iStart As Integer, Optional iLength As Integer = 1) I += 2 Wend - Dump + 'Dump End Public Sub UnSelectAll() $aSel.Clear - Dump + 'Dump End diff --git a/comp/src/gb.form/.src/GridView/_GridView_Rows.class b/comp/src/gb.form/.src/GridView/_GridView_Rows.class index dd4f324d7..5c99436c1 100644 --- a/comp/src/gb.form/.src/GridView/_GridView_Rows.class +++ b/comp/src/gb.form/.src/GridView/_GridView_Rows.class @@ -18,6 +18,7 @@ Property Read Max As Integer Property Width, W As Integer Property Resizable As Boolean Property Height, H As Integer +Property Read Selection As Integer[] Event _Refresh @@ -370,9 +371,10 @@ Public Sub _Clear() End -''Return an integer array of all the selected rows -Public Function GetSelected() As Integer[] - - Return $hSel._GetSelectedRows() - +'' Return an integer array of all the selected rows + +Private Function Selection_Read() As Integer[] + + Return $hSel._GetSelectedRows() + End