:: Re: [DNG] Need help to add/delete s…
Startseite
Nachricht löschen
Nachricht beantworten
Autor: Edward Bartolo
Datum:  
To: Fernando M. Maresca
CC: dng
Betreff: Re: [DNG] Need help to add/delete strings to/from a treeview.
Hi,

Lazarus Object Pascal and Gtk+ 2 use completely different
implementations for their widgets. Lazarus close follows Delphi in
which components (widgets) are manipulated in code using an object
oriented coding while Gtk+ 2 apparently uses common structures to
access and modify a widget's properties. To make thinks harder, I am
using a treeview for a list view as the latter seems not to exist.

Edward

On 15/03/2016, Fernando M. Maresca <fmaresca@???> wrote:
>
> Hi, I do not exactly know about freepascal details, but inside a gtk
> listview model, there has to be something like an array or equivalent
> object that represents the row, so you can have values for every column
> in the listview model.
>
> So I think that should be a constructor for such an object, something
> like ItemRow or ListViewRow or something like that.
> Or yo should be able to pass an array to listview.Items.Add().
>
> Hope this helps.
>
> Regards,
> Fer
> On Tue, Mar 15, 2016 at 07:41:21PM +0100, Edward Bartolo wrote:
>> Hi,
>>
>> I am using a GtkTreeView widget to use a listview. I need to
>> add/delete strings to/from the tree view but have not figured out how
>> this supposedly simple operation can be done.
>>
>> In Lazarus Object Pascal, the above is as simple as it can be:
>>
>> listview.Items.Add('the string I need to add');
>>
>> And:
>>
>> if listview.items.count > 0
>> then listview.Items.Delete(0); // if I want to delete the first string
>>
>> Edward
>> _______________________________________________
>> Dng mailing list
>> Dng@???
>> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
>