Re: [ROOT] TGListBox::Selected()

From: cstrato (aon.912121399@aon.at)
Date: Sat Jul 19 2003 - 20:04:12 MEST


Dear Valeriy

Your example is a TGComboBox, but I mean TGListBox.
Assume, that the vertical size of TGListBox has space for
ten entries, but it does only contain 4 entries. Clicking on
one entry selects this entry, but clicking in the empty space
below the entries deselects the selected entry. In this case
Selected() should emit -1.

Best regards
Christian

Valeriy Onuchin wrote:

> Hi Christian,
>this question is not clear for me. Check HTML listbox 
>("Modified within the last:") in
>http://carrot.cern.ch/CarrotExamples/FormTest.C
>it has an empty entry for deselecting items. Is this effect what
>you talking about? 
>
>Thanks. Regards. Valeriy
>
>
>  
>
>>Dear Rooters
>>
>>I would like to enable a button only, when I select an item in
>>TGListBox, but disable the button when deselecting all items
>>by clicking in the white space.
>>Sorrowly, the signal TGListBox::Selected() is only emitted,
>>when an item is selected. Is there a way to deselect the button?
>>
>>I am not sure but maybe adding the following in TGListBox::
>>ProcessMessage() could help:
>>   if(entry)
>>      ......
>>      Selected((Int_t) parm1);
>>   else
>>      Selected((Int_t) -1);
>>
>>Thank you in advance
>>Best regards
>>Christian
>>_._._._._._._._._._._._._._._._
>>C.h.i.s.t.i.a.n S.t.r.a.t.o.w.a
>>V.i.e.n.n.a       A.u.s.t.r.i.a
>>_._._._._._._._._._._._._._._._
>>
>>
>>
>>    
>>
>
>
>
>  
>



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET