giu icon indicating copy to clipboard operation
giu copied to clipboard

How to disable widget

Open mikigal opened this issue 2 years ago • 3 comments

Related problem

Hi, I want to disable some widgets (e. g. combo and checkbox) in the same way I as can do it with button

g.Button("Start").OnClick(handleButton).Size(360, 30).Disabled(true)

How can I achieve it?

Your request

Implement Disabled() function into other widgets same as for button

Alternative solution

No response

Additional context

No response

mikigal avatar Dec 29 '23 00:12 mikigal

Check Push/PopDisabled

gucio321 avatar Dec 29 '23 11:12 gucio321

Can you provide more details? I didn't find any method for disabling widgets, most are related to colors/fonts/styles

mikigal avatar Dec 29 '23 22:12 mikigal

It's in cimgui (begindisabled), ill provide more details tomorrow

gucio321 avatar Dec 29 '23 22:12 gucio321

well, tommorow wasn't tomorrow, but: There is a function in cimgui-go: BeginDisabled and EndDisabled. Use them in giu.Custom call. YOu can also use giu.Style().SetDisabled(true).To(...)

gucio321 avatar Jan 31 '24 10:01 gucio321