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

Re: TabPanel Click event (or workaround) wanted


here's the class
https://gitlab.com/gambas/gambas/-/blob/master/comp/src/gb.form/.src/TabPanel/_TabPanelButton.class?ref_type=heads

aah i see the TabButton has a DrawingArea as its first child

I just tested this and it works..

 Public Sub Form_Open()

 Dim $hObs As Observer
 $hObs = New Observer(TabPanel1._GetButton(0).Children[0]) As "BTN"

End

Public Sub BTN_MouseUp()

  Debug "mouseup"

End

respects
BruceS


On Fri, 27 Sept 2024 at 11:19, BB <adamnt42@xxxxxxxxx> wrote:

>
> On 27/9/24 7:21 pm, Bruce Steers wrote:
>
> You can get buttons as objects with hidden method TabPanel._GetButton()
>
> Ie...
>
> Dim hObs As Observer
> hObs = New Observer(TabPanel1._GetButton(0)) As "TabButton"
>
> Public Sub TabPanel_MouseUp()
>
> Debug "Got MouseUp On The Panel"
>
> End
>
> Hope that helps :)
> BruceS
>
> No joy. TabPanel1._GetButton(0) gives an Unknown Symbol error.
>
> I tried with TabPanel1.TabPanel._GetButton(0) and that eliminates the
> error but TabButton_MouseUp handler doesn't get invoke.
>
> 🙁
>
> b
>

Follow-Ups:
Re: TabPanel Click event (or workaround) wantedBruce Steers <bsteers4@xxxxxxxxx>
Re: TabPanel Click event (or workaround) wantedBB <adamnt42@xxxxxxxxx>
References:
TabPanel Click event (or workaround) wantedBB <adamnt42@xxxxxxxxx>
Re: TabPanel Click event (or workaround) wantedBruce Steers <bsteers4@xxxxxxxxx>
Re: TabPanel Click event (or workaround) wantedBB <adamnt42@xxxxxxxxx>