Jun 4, 2011 Replies: 60 Attached you find an example with a ScrollView with a Panel higher than the screen. The layouts are designed in the Designer, not in the code. There are 2 layout files: - Main with the ScrollView. - ScrollViewLayout has one Panel higher than the screen, 7 Label views and 7 EditText views, the Panel height is set so the last EditText view is on top of the screen when the panel's lower edge is on the lower edge of the screen. Clicking on an EditText moves the Scrollview up to show this EditText view on top of the screen to avoid interference with the virtual keyboard. Best regards. Attachments ScrollViewBigPanel1.jpg 18.3 KB · Views: 23,911 ScrollViewBigPanel2.jpg 28.6 KB · Views: 22,857 ScrollViewBigPanel.zip ScrollViewBigPanel.zip 8.8 KB · Views: 1,910 Last edited: Jul 11, 2017 Click to expand...
Attached you find an example with a ScrollView with a Panel higher than the screen. The layouts are designed in the Designer, not in the code. There are 2 layout files: - Main with the ScrollView. - ScrollViewLayout has one Panel higher than the screen, 7 Label views and 7 EditText views, the Panel height is set so the last EditText view is on top of the screen when the panel's lower edge is on the lower edge of the screen. Clicking on an EditText moves the Scrollview up to show this EditText view on top of the screen to avoid interference with the virtual keyboard. Best regards.
luciano deri Active Member Licensed User Longtime User Jul 18, 2014 #42 klaus said: If the ScrollView is added in the Designer you must not use Activity.AddView(scvMain, 0, 0, 100%x, 100%y) ! You must adjust the ScrollView.Panel.Height according to the row height and number. Click to expand... Other question: i want select a row and delete this. The key of my tabel is an auto incremet integer, i can use the panel.tab to allin the tabel with the scrollview? afther delete how refresh the screen? Tanks.
klaus said: If the ScrollView is added in the Designer you must not use Activity.AddView(scvMain, 0, 0, 100%x, 100%y) ! You must adjust the ScrollView.Panel.Height according to the row height and number. Click to expand... Other question: i want select a row and delete this. The key of my tabel is an auto incremet integer, i can use the panel.tab to allin the tabel with the scrollview? afther delete how refresh the screen? Tanks.
klaus Expert Licensed User Longtime User Jul 19, 2014 #43 You can remove the panel at the row to delete and change the Top property of all panels below the row to delete. If you use the Tag property to memorize the row index you'll need to decrement them by 1 for all row indexes higher than the deleted row index.
You can remove the panel at the row to delete and change the Top property of all panels below the row to delete. If you use the Tag property to memorize the row index you'll need to decrement them by 1 for all row indexes higher than the deleted row index.
luciano deri Active Member Licensed User Longtime User Jul 21, 2014 #44 Very, good. klaus said: You can remove the panel at the row to delete and change the Top property of all panels below the row to delete. If you use the Tag property to memorize the row index you'll need to decrement them by 1 for all row indexes higher than the deleted row index. Click to expand... Very good. Can i set the color of row selected and unselected?. When i select a row isn't difficult change color in event click but i must set standard color in the row select before. I think that i must pilot the pointer for list but i don't understand how.
Very, good. klaus said: You can remove the panel at the row to delete and change the Top property of all panels below the row to delete. If you use the Tag property to memorize the row index you'll need to decrement them by 1 for all row indexes higher than the deleted row index. Click to expand... Very good. Can i set the color of row selected and unselected?. When i select a row isn't difficult change color in event click but i must set standard color in the row select before. I think that i must pilot the pointer for list but i don't understand how.
klaus Expert Licensed User Longtime User Jul 21, 2014 #45 You should set a ProjectGlobal variable to hold the selected row index like Dim RowIndex = -1 As Int. Set to -1 if no row is selected. When you click on a row, in the Click event routine you know with RowIndex the currently selected row and you can reset it's standard color, then update RowIndex and set the 'selected' color for the new row. You could also unselect a selected row with a similar principle.
You should set a ProjectGlobal variable to hold the selected row index like Dim RowIndex = -1 As Int. Set to -1 if no row is selected. When you click on a row, in the Click event routine you know with RowIndex the currently selected row and you can reset it's standard color, then update RowIndex and set the 'selected' color for the new row. You could also unselect a selected row with a similar principle.
RauchG Active Member Licensed User Longtime User Oct 12, 2014 #46 Hello Klaus, maybe you have a tip for me. When you open the Activity only the labels and edit fields are visible. If the panel is scrolled all the way up, Back and Next buttons are visible below. I'm on the panel a hidden label field where I display my bottom position. This value I use for displaying the button. lblSrollEnd.Text = position If lblSrollEnd.Text> = 1770 Then Visible Buttons. Now I can not find a solution for multi-equipment. How do I get a fixed static value for the "1770". For example, 10 inch Tablet is the value much smaller. greeting Günter
Hello Klaus, maybe you have a tip for me. When you open the Activity only the labels and edit fields are visible. If the panel is scrolled all the way up, Back and Next buttons are visible below. I'm on the panel a hidden label field where I display my bottom position. This value I use for displaying the button. lblSrollEnd.Text = position If lblSrollEnd.Text> = 1770 Then Visible Buttons. Now I can not find a solution for multi-equipment. How do I get a fixed static value for the "1770". For example, 10 inch Tablet is the value much smaller. greeting Günter
klaus Expert Licensed User Longtime User Oct 12, 2014 #47 Sorry, but I don't understand exactly your problem. What does this value 1770 exactly represent ? Are the Back and Next buttons on the ScrollView.Panel or outsides of the ScrollView. Couldn't you use the postion of your hidden Label for the test, the ScrollView.Panel.Height ?
Sorry, but I don't understand exactly your problem. What does this value 1770 exactly represent ? Are the Back and Next buttons on the ScrollView.Panel or outsides of the ScrollView. Couldn't you use the postion of your hidden Label for the test, the ScrollView.Panel.Height ?
RauchG Active Member Licensed User Longtime User Oct 13, 2014 #48 klaus said: Sorry, but I don't understand exactly your problem. What does this value 1770 exactly represent ? Are the Back and Next buttons on the ScrollView.Panel or outsides of the ScrollView. Couldn't you use the postion of your hidden Label for the test, the ScrollView.Panel.Height ? Click to expand... The Back and Next buttons are on the scrollview form and outside the scrollview and not on the panel form. If I scroll the panel all the way up my hidden label has a value of 1776, if the value of the hidden label is> = 1770. If the Previous and Next buttons visible. How do you mean? Could not you use the postion of your hidden label for the test, the ScrollView.Panel.Height? When opening the Activiy I say, as in your example: scvHDB.Panel.LoadLayout ("01_01_00HDBForm") scvHDB.Panel.Height = pnlHDB.Height
klaus said: Sorry, but I don't understand exactly your problem. What does this value 1770 exactly represent ? Are the Back and Next buttons on the ScrollView.Panel or outsides of the ScrollView. Couldn't you use the postion of your hidden Label for the test, the ScrollView.Panel.Height ? Click to expand... The Back and Next buttons are on the scrollview form and outside the scrollview and not on the panel form. If I scroll the panel all the way up my hidden label has a value of 1776, if the value of the hidden label is> = 1770. If the Previous and Next buttons visible. How do you mean? Could not you use the postion of your hidden label for the test, the ScrollView.Panel.Height? When opening the Activiy I say, as in your example: scvHDB.Panel.LoadLayout ("01_01_00HDBForm") scvHDB.Panel.Height = pnlHDB.Height
klaus Expert Licensed User Longtime User Oct 13, 2014 #49 Can you post a small project showing the problem, it would be much easier to help you.
RauchG Active Member Licensed User Longtime User Oct 13, 2014 #50 klaus said: Can you post a small project showing the problem, it would be much easier to help you. Click to expand... First of all thanks for your effort. Attachments STD_Klaus.zip STD_Klaus.zip 13.6 KB · Views: 795
klaus said: Can you post a small project showing the problem, it would be much easier to help you. Click to expand... First of all thanks for your effort.
klaus Expert Licensed User Longtime User Oct 13, 2014 #51 In scvHDB_ScrollChanged replace this line If lblSrollEndKontrolle.Text >= 1770 Then '1830 Then by this line If Position >= pnlHDB.Height - scvHDB.Height - 10dip Then You don't need lblSrollEndKontrolle.Text. 10dip is the height where the Buttons are visible, you can change it to your convenience.
In scvHDB_ScrollChanged replace this line If lblSrollEndKontrolle.Text >= 1770 Then '1830 Then by this line If Position >= pnlHDB.Height - scvHDB.Height - 10dip Then You don't need lblSrollEndKontrolle.Text. 10dip is the height where the Buttons are visible, you can change it to your convenience.
RauchG Active Member Licensed User Longtime User Oct 14, 2014 #52 klaus said: In scvHDB_ScrollChanged replace this line If lblSrollEndKontrolle.Text >= 1770 Then '1830 Then by this line If Position >= pnlHDB.Height - scvHDB.Height - 10dip Then You don't need lblSrollEndKontrolle.Text. 10dip is the height where the Buttons are visible, you can change it to your convenience. Click to expand... So cool. Many thanks
klaus said: In scvHDB_ScrollChanged replace this line If lblSrollEndKontrolle.Text >= 1770 Then '1830 Then by this line If Position >= pnlHDB.Height - scvHDB.Height - 10dip Then You don't need lblSrollEndKontrolle.Text. 10dip is the height where the Buttons are visible, you can change it to your convenience. Click to expand... So cool. Many thanks
solfinker Member Licensed User Longtime User Jun 11, 2015 #54 Hello. How do I change the code so that the width of the scrollview fulls the screen? I have tried Code: Activity.LoadLayout("main") Activity.Width = 100%x scvTest.Panel.LoadLayout("cloro") scvTest.Panel.Height = pnlCloroFondo.Height and Code: Activity.LoadLayout("main") scvTest.Panel.LoadLayout("cloro") scvTest.Panel.Height = pnlCloroFondo.Height scvTest.Panel.width =100%x and Code: Activity.LoadLayout("main") scvTest.Panel.LoadLayout("cloro") scvTest.Panel.Height = pnlCloroFondo.Height pnlCloroFondo.width = 100%x but nothing happens Thank you
Hello. How do I change the code so that the width of the scrollview fulls the screen? I have tried Code: Activity.LoadLayout("main") Activity.Width = 100%x scvTest.Panel.LoadLayout("cloro") scvTest.Panel.Height = pnlCloroFondo.Height and Code: Activity.LoadLayout("main") scvTest.Panel.LoadLayout("cloro") scvTest.Panel.Height = pnlCloroFondo.Height scvTest.Panel.width =100%x and Code: Activity.LoadLayout("main") scvTest.Panel.LoadLayout("cloro") scvTest.Panel.Height = pnlCloroFondo.Height pnlCloroFondo.width = 100%x but nothing happens Thank you
klaus Expert Licensed User Longtime User Jun 11, 2015 #55 You should set the Horizontal Anchor of scvTest to BOTH in the Designer. Or you could use this code., not advised: Code: Activity.LoadLayout("main") scvTest.Panel.LoadLayout("cloro") scvTest.Width = 100%x scvTest.Panel.Width = 100%x scvTest.Panel.Height = pnlCloroFondo.Height You tried Activity.Width = 100%x, this will do nothing because Activity.Width is equal to 100%x !
You should set the Horizontal Anchor of scvTest to BOTH in the Designer. Or you could use this code., not advised: Code: Activity.LoadLayout("main") scvTest.Panel.LoadLayout("cloro") scvTest.Width = 100%x scvTest.Panel.Width = 100%x scvTest.Panel.Height = pnlCloroFondo.Height You tried Activity.Width = 100%x, this will do nothing because Activity.Width is equal to 100%x !
solfinker Member Licensed User Longtime User Jun 11, 2015 #56 I am still doing sth wrong. AutoScaleAll ?? Only one variant (320x600)? Thank you! Attachments cloro.bal cloro.bal 6.3 KB · Views: 639 main.bal main.bal 1.4 KB · Views: 671
klaus Expert Licensed User Longtime User Jun 11, 2015 #57 It would be easier if you posted the whole project as a zip file, just with code snippets and layout files it's difficult to give a concrete advice.
It would be easier if you posted the whole project as a zip file, just with code snippets and layout files it's difficult to give a concrete advice.
solfinker Member Licensed User Longtime User Jun 11, 2015 #58 There you are! Thank you! Attachments cloro110615.zip cloro110615.zip 15.4 KB · Views: 736
solfinker Member Licensed User Longtime User Jun 11, 2015 #59 Sorry. I didn't read the first part or your advise. Now it works smoothly
hibrid0 Active Member Licensed User Longtime User Sep 18, 2018 #60 Hi I follow this for my small project, I create the layaout for load on the scrollview, that work fine. Create a script on designer for the layout for load on the scrollview, but when I run the app, all views on the layout are not in order like the script, just like put on the designer.
Hi I follow this for my small project, I create the layaout for load on the scrollview, that work fine. Create a script on designer for the layout for load on the scrollview, but when I run the app, all views on the layout are not in order like the script, just like put on the designer.