Re: [gtkmm] Entry widget on_insert_at_cursor()?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Think I got it figured out, well at least it works:

void
Entry_64::on_changed()
{
~  int i = 0;
~  Glib::ustring temp (get_text());
~  if ((temp[0] == '0')  && (tolower (temp[i]) != 'x'))
~    i = 2;
~  for (; i < temp.length(); i++)
~    {
~      if (!isxdigit (temp[i]))
~        {
~          temp.erase (i, 1);
~        }
~    }
~  set_text (temp);
~  update_data();
}

Greg Rogers wrote:
| Is this broke or am I just using it wrong, or both?
|
| I can get the other protected member functions working but not this one,
| it never seems to be called.
|
| I'm setting up an entry widget for entering 64 bit hex numbers and need
| to be able to filter the input as well as catch changes as they are
| entered instead of requiring hitting the enter key.
|

- --
*************************************************
*   Greg Rogers		Cray Inc.		*
*   grogers cray com	(715)726-4631		*
*************************************************
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/Z3aPs3ZHWtAE+l4RAmsQAJ9Srrqe7NfJE4YRb1SkXJ1g8+5xhACcDmD3
fNNSk2xNn+9e0jA2YiGSf7g=
=reOl
-----END PGP SIGNATURE-----




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]