Marco Rossetti's blog

Using associative arrays with a text-based GtkComboBox

Sometimes I need to create a combobox to manage associative arrays. I need something which works like HTML comboboxes, where the value chosen by the user, is different from the one sent to the application.

Just like that:

<option value="Red">Apple</option>

so I wrote a component which doesn't use a GtkTreeModel to manage data.


<?php
class GtkAssociativeComboBox {
private $data;
public $box;

public function __construct ()
{
$this->box = GtkCombobox::new_text();
$this->data = null;
}

/**

Getting (x,y) coordinates when clicking on images

I wrote an application where the user clicks on a GtkImage, and I want to know *where* the user clicked. Here's a simple object extending GtkAlignment.

The doors open up again

I was a RapidQ programmer. RapidQ was my "Paradise" for several reasons:

- I had not to pay to get/use development tools
- Executables were able to use external libraries
- GUI creation was *really* easy
- rudimental object-oriented programming

when I realized that RapidQ had no future, the doors of heaven closed. I've been searching for another good language for years.

Syndicate content