I have a Flex TileList with an itemRenderer made by me.
The list loads the content perfectly and renders it.
Renderer is a simple canvas element with a checkbox and another canvas with some labels with data.
I implemented a method that, on TileList itemClick="clickedItemHandler(event)", changes the state of the checkbox (if checked -> uncheck, and vice versa).
Problem is: the method works if i click on any place of the item, EXCEPT the checkbox. When i click the checkbox, it doesn't change state.
My thoughts: maybe i was changing the state of the checkbox, and the event changing it back, but i debugged it and it doesn't look like so..
The solution is actually quite simple. Perhaps the best way to make this work is making sure the CheckBox ignores mouse clicks, and this can be done by setting the "mouseEnabled" attribute to false.
Cheers
I think you're probably correct. The checkbox toggles when you click it and then you toggle it back when the event gets to the TileList. You may not see this when debugging depending on how you are confirming... you may be able to fix this by confirming that the target of the event is not a CheckBox.
Related
I am using "javafx.scene.control.ComboBox" on Java 8 and I noticed that whenever the combobox does not have room below and instead pops up, the bordering styling of the elements switches as if it still pops down.
How can I access the styling for that to fix it?
Managed to fix this by actually extending the ComboBoxListViewSkin. In there, I've stuck a method that updates the styling, and does that by calling super.getPopup(), gets the AnchorY of that and compares it with the combo-box Y. After determining if the popup is below or above the combo, I set the correct styling on super.getListView...
Also, that method I've added, has to be called from the "ON_SHOWN" event of the combo-box.
I've tried several other variants but the damn thing just yields unstable behavior.
I have a dialog based application. I have one static text control and a button on this, both of which I have made invisible in the beginning. I want to show both the controls on reaching a certain condition. When I click this button, again I want to make both the controls invisible.
However, I am able to show and hide the control and also captured the button click event like this:
ON_BN_CLICKED(IDC_MY_BUTTON, &MyDlg::OnBnClickedMyButton)
and defined OnBnClickedMyButton().
But when I press the button, it is not pressed and the event is also not generated.
Any suggestions?
First check if the IDC_MY_BUTTON exists and is valid.
Remember to add DECLARE_MESSAGE_MAP() at the header file.
Also check at the BEGIN_MESSAGE_MAP(MyClass,MyParentClass) if the class
and the parent class you write are right.
I hope this helps.
I think the IDC_MY_BUTTON maybe is invalid or other control has the same ID.
Well, finally I have come to know that though the button was visible but on clicking it was not taking control, hence I used BringWindowToTop() to draw it on top. Now it is being clicked and OnBnClickedMyButton() is also being called.
But now the issue is that after calling BringWindowToTop() the button is not shown. It is shown only when I take the mouse pointer on it. Not able to understand what is the issue.
I have a flex mobile project. In my homeview I have a spark datagrid. The selectionMode is "singleCell". I have an eventlistener on the datagrid which listens to the selectionChange event. When someone clicks on a cell, a callout view is showed with a list.
Now when I want to scroll in the datagrid (if it has many rows), obviously the selectionChange event is triggered instead of the normal scrolling. Does anyone has a solution for this?
The curious thing is, when you use a list (in place of a spark datagrid) with a change event (spark.components.supportClasses.ListBase.change), the list is able to say the difference between scrolling and a selection without any issue!
Correct, the issue is caused by the singleCell editmode #Al_Birdy.
I have semi-solved it by using a doubleclick event on the datagrid. The app will also be exported as a desktop application in the final stage so that isn't a real bad idea.
As www.Flextras.com pointed out, the datagrid is not yet optimized for mobile usage. If I may add something to that, it isn't that mature either. To solve this issue, basicly a likewise approach should be implemented like the list control has. In this control, this behaviour is implemented (the difference between a scroll event and a touch/click event). It kinda surprised me that the spark datagrid didn't had this behaviour. But then again it wouldn't surprise me they took the 'ol good desktop' component and ported it, which might explain everything.
Sorry for such a rudimentary question, but I am not experienced in Blend 4 much at all.
What I need to do, and based on the little I know or have seen it seems that Blend is the place to do it, is to create a "state" for a button to appear when it is disabled. i.e., the button I'm working with is a Sign Out button...the button IsEnabled property is bound to the WebContext.User.IsAuthenticated property. So, when the app is loading I want the button's "disabled state (<-- created in Blend?) to appear...once authentication is completed, the binding to IsEnabled will change, and I want the button's "enabled state" to kick in. How to accomplish this? Thanks in advance.
Your problem looks extremely similar to an issue I was having the other day.
If you go to this thread you may be able to use that as a solution: Expression Blend Interaction: How to set Trigger to Look for IsEnabled Value of Button?
I have a Boolean value there called "IsSavedAllowedBool". You would want to replace that with whatever bool you are binding to - which looks as if it might be WebContext.User.IsAuthenticated.
I have been developing an application for the past couple of weeks and as of yesterday all of the textinputs have become uneditable. It seems like when you click on one it switches between the focusIn state and then back to the focusOut state. What could cause this?
Sounds like you've added an event listener that causes you to lose focus just when you gain it. Without a look at the code, though, all we can do is guess.
A TabNavigator was causing the problem. By removing the TabNavigator and replacing it with a TabBar and ViewStack it fixed the problem. If you looking at the comments section of this page http://livedocs.adobe.com/flex/3/html/help.html?content=navigators_4.html you will be able to see in more detail what the problem is