[Gambas-user] ColumnView and exec or shell to button

Nicolas Koch nkoch22 at ...626...
Sat Nov 15 21:24:39 CET 2008


well this is what I got so far

Just to clarify Software = CloumnView1

' Gambas class file

PUBLIC SUB Form_Open()

  ME.Text = "wrtest"

END

'ColumnView
PUBLIC SUB _new()

  DIM iwidth AS Integer
  DIM irowcounter AS Integer
  DIM icolcounter AS Integer
'Software
  Software.Columns.Count = 2
  iwidth = Software.Width / Software.Columns.Count
  Software.Columns[0].Width = 200
  Software.Columns[0].Text = " Name"
  Software.Columns[1].Width = 400
  Software.Columns[1].Text = " Description"

  ' Software List
  Software.Clear()
  Software.Add("key1", "wrtest")
  Software.Add("key1-1", "test1", NULL, "key1")
  Software.Add("key1-2", "test2", NULL, "key1")

END

'Install Software

PUBLIC SUB Install_Click()

  IF Software.Current = NULL THEN RETURN

END


Where would I add the command for each row in the column?  Is this
correct so far?

Nick

On Sat, Nov 15, 2008 at 10:59 PM, Doriano Blengino
<doriano.blengino at ...1909...> wrote:
> Nicolas Koch ha scritto:
>> For the button_click() I have the following
>>
>> PUBLIC SUB button_Click()
>>
>>   IF ColumnView1.Item.Selected = NULL THEN RETURN
>>       message("error")
>>   ELSE
>>       makeOperations()
>>   ENDIF
>>
>> END
>>
>> I still don't understand how to add a command to the a row or item I have listed
>>
> Not sure, but...
>  makeOperations(ColumnView1.Current.text)
>
> will pass to makeOperations() a string -- the text of the item. You can
> also display a value and use another value (key <-> text).
>
> Could this work?
>
> Read carefully the documentation about Columnview.
>
>
> --
> Doriano Blengino
>
> "Listen twice before you speak.
> This is why we have two ears, but only one mouth."
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list