EtheaDev / StyledComponents

Components similar to Delphi VCL Buttons, Toolbar, DbNavigator, BindNavigator, ButtonGroup and CategoryButtons with Custom Graphic Styles, and an advanced, full-customizable TaskDialog, also with animations!
Apache License 2.0
152 stars 34 forks source link

about the buttons of styleddbnavigator #46

Closed vafadar1977 closed 1 week ago

vafadar1977 commented 2 weeks ago

How can I enable or disable the visible buttons of styleddbnavigator runtime by code?

vafadar1977 commented 2 weeks ago

?

carloBarazzetta commented 2 weeks ago

The buttons are automatically enabled/disabled based on record position of Dataset (for movement buttons) or based on editing state (for editing buttons)... like a normal DbNavigator... How do you want to change their status? Try to give me an example

vafadar1977 commented 1 week ago

sometimes, I need to disable some actions on database, based on the user role. for example I need to disable edit button for some users, without changing the visibility status of buttons. when I change the button status to invisible, dbnavagitor size or dbNavButtons size will be changed and I don't like it.

vafadar1977 commented 1 week ago

woll2woll dbnavigator is the best dbnavigator, but it is not free. you can add some custom button with custom action and custom caption to dbnavigator. you can change the enable or disable staus of each button, ... I found your styledDBNavigator with some customizing should be better than woll2woll dbnavigaotr .

carloBarazzetta commented 1 week ago

Well, I can do some changes to my componen to give you a chance to manually enable or disable buttons adding an EventHandler, but adding new buttons is more complicated...

vafadar1977 commented 1 week ago

Thanks Mr Barazzetta

carloBarazzetta commented 1 week ago

In 3.6.9 version you can use EnableNavBtn event to enable/disable DbNavigator as you want. Look the example in the StyledComponentsDemo - form StyledDbNavigatorForm

vafadar1977 commented 1 week ago

Thanks a lot

On Sat, Oct 12, 2024 at 2:41 PM Carlo Barazzetta @.***> wrote:

In 3.6.9 version you can use EnableNavBtn event to enable/disable DbNavigator as you want. Look the example in the StyledComponentsDemo - form StyledDbNavigatorForm

— Reply to this email directly, view it on GitHub https://github.com/EtheaDev/StyledComponents/issues/46#issuecomment-2408525518, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFOYHJFCPQJP74IOUTUULVLZ3D7XPAVCNFSM6AAAAABPKIT4COVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBYGUZDKNJRHA . You are receiving this because you authored the thread.Message ID: @.***>

--

Hossein Vafadar