I wonder why there is only a rightClick event available for textLabels.. It would be great if there would also be a click event because then I could do the following:
Assuming, that I have a pair of one checkBox and one corresponding textLabel, I could implement that the checkBox also becomes checked (or unchecked) by clicking the textLabel..
What do you think, could there be a click event for textLabels in future releases (or maybe it's not there yet, because it's technically impossible or kind of difficult)?

asked 04 Sep '13, 07:59

Mazzel's gravatar image

accept rate: 0%

Hi Marcel, We didn't add a click event to text labels because text labels are almost never clicked. However, the use case you described makes sense. We added a ticket to our issue tracking system for your request.


answered 04 Sep '13, 08:05

Yalim%20Gerger's gravatar image

Yalim Gerger ♦♦
accept rate: 15%

Hi Yalim,

That would be very usefull. An idea would be to add a label attribute to the CheckBox component. Together with a labelPosition (right/left) attribute will make the checkBox component complete. Just my 2c.

Best, Michiel A

(04 Sep '13, 09:21) Michiel A

Hi Michiel, There is a label attribute on the check box component. But it only is functional if the component is used in XY Layout. Unfortunately, clicking it does not change the status of the check box, either.

(04 Sep '13, 09:28) Yalim Gerger ♦♦

Yeah, Michiel's attempt also sounds pretty good.
And btw. another question: Is it possible to check/uncheck a checkBox programmatically? I looked for it in the API doc, but didn't find anything..
Some background: I have something like a "View settings" panel where the user can show and hide some columns of the grid via checkbox. There is a procedure which looks for the ischecked value of the checkBox and then either shows the corresponding column or hides it. Its action is bound to the checkBox'es valueChanged event.
Apart from that, I have a reset_grid_state button which has kind of the same functionality as shown in tutorial no. 47. In the postInitialize event of my gridPanel I save the current grid state into a session variable and the button just loads it. Naturally, it hides the columns which the user showed manually via the checkBoxes (or shows the manually hidden ones). However, it doesn't check/uncheck the corresponding checkBoxes which then looks a little odd..


answered 04 Sep '13, 10:38

Mazzel's gravatar image

accept rate: 0%

edited 04 Sep '13, 10:40

Hi Marcel,

You can use the api_component.SetValue API and set the checked or the unchecked value as you specified in the component. By default they are Y and N respectively.


answered 04 Sep '13, 10:41

Yalim's gravatar image

Yalim ♦♦
accept rate: 23%

edited 04 Sep '13, 10:42

Aha, like this:
Api_Component.SetValue( 'samplePanel.sampleCheckBox', 'checked = ''Y''' );
or just like this
Api_Component.SetValue( 'samplePanel.sampleCheckBox', 'Y' ); ?

(04 Sep '13, 10:50) Mazzel

the latter: Api_Component.SetValue( 'samplePanel.sampleCheckBox', 'Y' );

(04 Sep '13, 10:51) Yalim ♦♦

facepalm Sorry, was maybe a little too obvious.. But thanks again! ;)

(04 Sep '13, 11:01) Mazzel

:-). You are welcome.

(04 Sep '13, 11:02) Yalim ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 04 Sep '13, 07:59

Seen: 1,073 times

Last updated: 04 Sep '13, 11:02

© Copyright Gerger 2017