Hi Fred, When there is no need of the visual designer, I'm using Visual Studio Code with pascal extensions to edit my project and I started to write your lines of code and while doing that, VSC gave me some suggestions so now I know that the following line of code works well:
ttoolbar1.buttons[1].enabled := FALSE; // to disable the button. BTW, the first button starts at zero index. On Sat, Feb 20, 2021 at 7:23 AM vasi vasi <[email protected]> wrote: > Thank you Fred, I will try these today > and let you know. > > On Fri, Feb 19, 2021 at 5:19 PM fredvs <[email protected]> wrote: > >> And to disable-enable: >> >> procedure tmainfo.disablebutton(const sender: TObject); >> begin >> ttoolbar1.buttons[2].state := ttoolbar1.buttons[2].state + [as_disabled]; >> end; >> >> procedure tmainfo.enablebutton(const sender: TObject); >> begin >> ttoolbar1.buttons[2].state := ttoolbar1.buttons[2].state - [as_disabled]; >> end; >> >> >> >> -- >> Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ >> >> >> _______________________________________________ >> mseide-msegui-talk mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk >> > > > -- > Vasi > -- Vasi
_______________________________________________ mseide-msegui-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

