Query on controlling tree selections

Hi All,
I have an application which uses a Tree View. The application window is divided into two parts, the left
part having a tree view and the right part a set of widgets which takes user inputs. The widgets displayed
on the right side are based on the tree row selection. For the editable widgets displayed on the right side,
there is an Apply or Cancel option[buttons].

If changes are done to the editable widgets and if the user tries to move across tree selection, without
an Apply, I need to control in the following manner[Expected behaviour]:
a. Display a dialog box, with 2 buttons[Yes/No]. If Yes clicked, then first do an 'Apply' and then
move across the tree selection,[ie allow the tree selection 'changed' signal to go through after an 'Apply']
b. If No, then just cancel the tree selection 'changed' signal.

I understand that there is a 'set_select_function' for the Tree Selection widget, which controls
the movement of tree selections, but with that I have the following issue, as explained in my code snippet:


sub callback_for_set_select_function
   if ( Apply_Reguired) {
   # The issue here is it always returns a FALSE here from this function,
   # and not based  on the signal handlers connected to the Yes/No buttons in the dialog box.

sub display_dialog_box{
  #Create the dialog box and connect ths signal handlers.


I understand that since I am calling signal handlers, the status is returned directly from
'callback_for_set_select_function' and not based on the Yes/No button 'clicked'. How do I overcome this? Or am I missing something here?

Any help in this regard will be highly appreciated.


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