Re: Gtk::Entry()



Add following line in class constructor
current_entry.signal_changed.connect(sigc::bind(sigc::mem_fun(*this,
&ThisClass::AutoSkip), &current_entry, &next_entry, text_limit_for_current_entry));

Create following function
void ThisClass::AutoSkip(Gtk::Entry * pCurrentEntry, Gtk::Entry * pNextEntry, int nLimit)
{
   //TODO validate inputs

  //Check limit violation
  if(nLimit <= pCurrentEntry->get_text_length())
  {
//TODO copy extra text to next entry (in case nLimit < text length)

        //Set focus to next entry
        pNextEntry->grab_focus();
  }
}

regards
Mohith Manoj

On 13 July 2012 05:44 AM, Arbol One wrote:
Hey folks, I am here again with the same questions.

My entry box must accept a certain number of character, when that
number of characters has been reached the cursor must jump to the next
entry box, what modifications should I make to my program, so that the
Gtk::Entry() behaves in this manner?

TIA

*Freedom of speech does not translate to freedom of insulting*



_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list


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