GMan Well-Known Member Licensed User Longtime User Aug 11, 2013 #161 Can you see the correct results in the log ? Code: Log(IP.Answer) Log(IP.CompactAnswer) lbl.Text=(IP.Answer) 'not working...
Can you see the correct results in the log ? Code: Log(IP.Answer) Log(IP.CompactAnswer) lbl.Text=(IP.Answer) 'not working...
ciprian Active Member Licensed User Longtime User Aug 11, 2013 #162 The Log provides me the corect answer. But the text into the label is not updating
GMan Well-Known Member Licensed User Longtime User Aug 11, 2013 #163 Did you also try: Code: lbl.Text = IP.CompactAnswer
ciprian Active Member Licensed User Longtime User Aug 11, 2013 #164 Same result. The Log = OK but the label NOT. I'm stuck
GMan Well-Known Member Licensed User Longtime User Aug 11, 2013 #165 Maybe it helps when you redraw (invalidate) the Label after changing the text ?
ciprian Active Member Licensed User Longtime User Aug 11, 2013 #166 Not even once.... i don't know what to try .... i'm gonna create a new threat with the project. Hoping someone will see the error. I will come back in an hour.
Not even once.... i don't know what to try .... i'm gonna create a new threat with the project. Hoping someone will see the error. I will come back in an hour.
Erel B4X founder Staff member Licensed User Longtime User Aug 11, 2013 #167 You are changing the text of the wrong label. You should call clv.GetPanel to get the panel of the relevant item and then call Panel.GetView to get the label. See the example that comes with CustomListView. There is no magic. A new label will not reference the label in the list unless you specifically set it.
You are changing the text of the wrong label. You should call clv.GetPanel to get the panel of the relevant item and then call Panel.GetView to get the label. See the example that comes with CustomListView. There is no magic. A new label will not reference the label in the list unless you specifically set it.
Mashiane Expert Licensed User Longtime User Aug 12, 2013 #169 Hi Erel, Im trying to develop an editable grid based on your customlistview. I have a few questions please, can you perhaps check when you have time.. http://www.b4x.com/android/forum/threads/editable-grid-using-customlistview.31729/
Hi Erel, Im trying to develop an editable grid based on your customlistview. I have a few questions please, can you perhaps check when you have time.. http://www.b4x.com/android/forum/threads/editable-grid-using-customlistview.31729/
tunderin Member Licensed User Longtime User Aug 29, 2013 #170 As posted, the CustomListview displays white space below the list when the list is too short to fill the screen. The white space below is actually the exposed underlying scrollview. This behavior can be fixed by making the scrollview height follow the scrollview panel height (which is adjusted when items are added or removed). The scrollview height shouldn't exceed 100%Y or the list will not scroll. In the CustomListView class, make changesto the two following subs: To the RemoveAt sub, add the line sv.Height=sv.Panel.Height right after the line that adjusts sv.Panel.Height To the InsertAt sub, add the line If sv.Panel.Height<100%y Then sv.Height=sv.Panel.Height right after the line that adjusts sv.Panel.Height Last edited: Jan 6, 2014
As posted, the CustomListview displays white space below the list when the list is too short to fill the screen. The white space below is actually the exposed underlying scrollview. This behavior can be fixed by making the scrollview height follow the scrollview panel height (which is adjusted when items are added or removed). The scrollview height shouldn't exceed 100%Y or the list will not scroll. In the CustomListView class, make changesto the two following subs: To the RemoveAt sub, add the line sv.Height=sv.Panel.Height right after the line that adjusts sv.Panel.Height To the InsertAt sub, add the line If sv.Panel.Height<100%y Then sv.Height=sv.Panel.Height right after the line that adjusts sv.Panel.Height
J JForge Member Licensed User Longtime User Sep 6, 2013 #171 I know that at the first post Erel has said that you can add a customlistview with the designer by adding a customview and changing its type to a customlistview, but in the designer the option to change that is grayed out.. Is that still possible to do?
I know that at the first post Erel has said that you can add a customlistview with the designer by adding a customview and changing its type to a customlistview, but in the designer the option to change that is grayed out.. Is that still possible to do?
tunderin Member Licensed User Longtime User Sep 7, 2013 #172 The type is not changeable, you are interested in "Custom Type" near the bottom of the properties table but before you try to declare it, you must first prepare the CustomListview class to support the Customview feature. In the CustomListview class, change the first line of the Initialze sub from: Code: Public Sub Initialize (vCallback As Object, vEventName As String) to: Code: Public Sub Initialize (TargetModule As Object,EventName As String) You'll notice that Eventname is already declared in Class Globals, change it to mEventname to avoid conflict. Remember to update two lines in the Panel_Click sub to mEventname Change two lines in the Initialze sub to read: Code: mEventName = EventName CallBack = TargetModule Finally, add the following sub to the class Code: Sub DesignerCreateView(Base As Panel, Lbl As Label, Props As Map) End Sub The class is ready. With that, back in Designer, if you drop down the list next to Custom Type, you should now see CustomListview listed there. Select it. Update: In thinking a bit more about how CustomListview works, I now believe that it's going to require some re-tooling to make this work... I'll look at this again on Monday - my own project needs this too & sometime soon . Last edited: Sep 7, 2013
The type is not changeable, you are interested in "Custom Type" near the bottom of the properties table but before you try to declare it, you must first prepare the CustomListview class to support the Customview feature. In the CustomListview class, change the first line of the Initialze sub from: Code: Public Sub Initialize (vCallback As Object, vEventName As String) to: Code: Public Sub Initialize (TargetModule As Object,EventName As String) You'll notice that Eventname is already declared in Class Globals, change it to mEventname to avoid conflict. Remember to update two lines in the Panel_Click sub to mEventname Change two lines in the Initialze sub to read: Code: mEventName = EventName CallBack = TargetModule Finally, add the following sub to the class Code: Sub DesignerCreateView(Base As Panel, Lbl As Label, Props As Map) End Sub The class is ready. With that, back in Designer, if you drop down the list next to Custom Type, you should now see CustomListview listed there. Select it. Update: In thinking a bit more about how CustomListview works, I now believe that it's going to require some re-tooling to make this work... I'll look at this again on Monday - my own project needs this too & sometime soon .
Erel B4X founder Staff member Licensed User Longtime User Sep 7, 2013 #173 You do not need to modify CustomListView code. v1.10 already did it. You should change the CustomType property in the designer. Not the Type property (I will fix the instructions in the first post...)
You do not need to modify CustomListView code. v1.10 already did it. You should change the CustomType property in the designer. Not the Type property (I will fix the instructions in the first post...)
tunderin Member Licensed User Longtime User Sep 7, 2013 #174 Erel said: You do not need to modify CustomListView code. v1.10 already did it. You should change the CustomType property in the designer. Not the Type property (I will fix the instructions in the first post...) Click to expand... Thanks Erel! I missed the class update & was still working with v1.01
Erel said: You do not need to modify CustomListView code. v1.10 already did it. You should change the CustomType property in the designer. Not the Type property (I will fix the instructions in the first post...) Click to expand... Thanks Erel! I missed the class update & was still working with v1.01
J JForge Member Licensed User Longtime User Sep 9, 2013 #175 Thanks Erel! Only thing is, when I click the dropdown for the CustomType is completely blank. Any idea there..?
Thanks Erel! Only thing is, when I click the dropdown for the CustomType is completely blank. Any idea there..?
Erel B4X founder Staff member Licensed User Longtime User Sep 9, 2013 #176 Can you upload your project (File - Export as zip)?
J JForge Member Licensed User Longtime User Sep 9, 2013 #177 Here it is, for testing some basics I am using a listview as a placeholder Thanks Erel! Attachments Test_Ground.zip Test_Ground.zip 8.6 KB · Views: 544
Erel B4X founder Staff member Licensed User Longtime User Sep 10, 2013 #178 You didn't add CustomListView class to your project. You should download it from the project attached to the first post.
You didn't add CustomListView class to your project. You should download it from the project attached to the first post.
J JForge Member Licensed User Longtime User Sep 10, 2013 #179 ::facepalm:: I can't believe I forgot to add it to that project! I had added it to another app I'm making, and forgot to for this one... THANKS EREL
::facepalm:: I can't believe I forgot to add it to that project! I had added it to another app I'm making, and forgot to for this one... THANKS EREL
J JForge Member Licensed User Longtime User Sep 10, 2013 #180 I hate to sound like a complete n00b here, but if I use the designer for a scroll view, and there are less items than it takes to fill the length of the CustomListView, it shows gray space at the bottom.. Is it possible to just make it black, or any other color for that matter..?
I hate to sound like a complete n00b here, but if I use the designer for a scroll view, and there are less items than it takes to fill the length of the CustomListView, it shows gray space at the bottom.. Is it possible to just make it black, or any other color for that matter..?