Re: Pango::Layout text within Gtk::Entry
- From: Erdem Gokhan YILMAZ <gokhan yilmaz havelsan com tr>
- To: Bob Caryl <bob fis-cal com>
- Cc: gtkmm-list gnome org
- Subject: Re: Pango::Layout text within Gtk::Entry
- Date: Thu, 28 Apr 2005 10:02:12 +0300
Hi Bob,
Thanks for the fast reply,
What you suggest is actually what I am doing. I have derived my own
class from Gtk::Entry and implemented the on_grab_focus() method.
What I want to do is, poping up a dialog box, whenever the user clicks
on Entry field. This dialog box will supply min,max,default values for
the user and let him/her
choose one of the three value or enter a valid one within the limits.
Your solution, which I have tried before hand, works but in a strange
way. When you first click the Entry and set a value, markup doesnt work
but whenever you try it second time it works. I guess this ambiguity is
due on_grab_focus() method. If it is, can you suggest me another way to
handle the on_click event within the Entry. Below is a more detailed
snap of my code .
...
...
void ventry::on_grab_focus(void){
switch(this->ve_type){
case VE_INTEGER:
this->input_verify=new integer_iv(this->copy_instance);
id=this->input_verify->run();
if(id==Gtk::RESPONSE_OK)this->set_text(this->input_verify->get_val());
markup+="<i>";
markup+=this->get_text();
markup+="</i>";
this->get_layout()->set_markup(markup);
delete this->input_verify;
break;
case VE_FLOAT:
...
...
Thanks in advance.
Best Regards.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]