S Scolioza Member Licensed User Longtime User Feb 7, 2012 #1 Hi everyone. First of all please excuse my english. I started to learn B4A and i ma thinking seriously to buy it because it is a great tool. Now i am trying to make a rebus or crosswords program but i am stuck so i need your help. So.. I have 64 labels grouped in a single panel. In this labels the user will input lettres from a keyboard. What i am trying to do is to implement a gesture as is follows: 1. when user press on one label and slides (horizontaly or vertically ) a new layout is loaded which includes the keyboard and the row (if it was slide horizontaly ) or column (if it was slide vertically ). How can i implement this gesture. Do i need the full version of B4A or i can use the demo? Thank you in advance !
Hi everyone. First of all please excuse my english. I started to learn B4A and i ma thinking seriously to buy it because it is a great tool. Now i am trying to make a rebus or crosswords program but i am stuck so i need your help. So.. I have 64 labels grouped in a single panel. In this labels the user will input lettres from a keyboard. What i am trying to do is to implement a gesture as is follows: 1. when user press on one label and slides (horizontaly or vertically ) a new layout is loaded which includes the keyboard and the row (if it was slide horizontaly ) or column (if it was slide vertically ). How can i implement this gesture. Do i need the full version of B4A or i can use the demo? Thank you in advance !
Erel B4X founder Staff member Licensed User Longtime User Feb 7, 2012 #2 You will probably need the full version. There are several related examples here: Basic4android Search: sliding panels Upvote 0
You will probably need the full version. There are several related examples here: Basic4android Search: sliding panels
S Scolioza Member Licensed User Longtime User Feb 7, 2012 #3 Thank you. I will buy it. But just one question: I was thinking if user click on one label this will turn green then the program will wait for another click on the label left or up and. when is getting the second input it will open the keyboard layout. I tried to do this and defined two label objects as senders and then compare left and top position. The problem is that after first click the second sender will get the first input . How can avoid this?? Dim labelpos1 as label : labelpos1 = sender ' get first click Dim posx1, posy1 as float osx1 =labelpos1.left : posy1 = labelpos1.top Dim labelpos2 as label : labelpos2 = sender ' get second click Dim posx2, posy2 as float osx2 =labelpos2.left : posy2 = labelpos1.top the result is: posx1=posx2 posy1=posy2 Upvote 0
Thank you. I will buy it. But just one question: I was thinking if user click on one label this will turn green then the program will wait for another click on the label left or up and. when is getting the second input it will open the keyboard layout. I tried to do this and defined two label objects as senders and then compare left and top position. The problem is that after first click the second sender will get the first input . How can avoid this?? Dim labelpos1 as label : labelpos1 = sender ' get first click Dim posx1, posy1 as float osx1 =labelpos1.left : posy1 = labelpos1.top Dim labelpos2 as label : labelpos2 = sender ' get second click Dim posx2, posy2 as float osx2 =labelpos2.left : posy2 = labelpos1.top the result is: posx1=posx2 posy1=posy2
Erel B4X founder Staff member Licensed User Longtime User Feb 7, 2012 #4 I'm not sure that I understand. If you can please post the complete code. Upvote 0
S Scolioza Member Licensed User Longtime User Feb 7, 2012 #5 hi again. i will attach my code to be more explicit. I figured out how to resolve my first problem but now i have one bigger. So how can i take data from the second layout and move in first without destroy it ? Also if you have any comments i will be glad to hear because it is the first time i am writing code since spectrum days.. Attachments rebus.zip rebus.zip 10.3 KB · Views: 337 Upvote 0
hi again. i will attach my code to be more explicit. I figured out how to resolve my first problem but now i have one bigger. So how can i take data from the second layout and move in first without destroy it ? Also if you have any comments i will be glad to hear because it is the first time i am writing code since spectrum days..
Erel B4X founder Staff member Licensed User Longtime User Feb 8, 2012 #6 I haven't looked deeply into your code. However it seems to be much longer than needed. See this tutorial: Tick-Tack-Toe: working with arrays of views See this tutorial about working with multiple layouts: Different examples with 2 layouts Upvote 0
I haven't looked deeply into your code. However it seems to be much longer than needed. See this tutorial: Tick-Tack-Toe: working with arrays of views See this tutorial about working with multiple layouts: Different examples with 2 layouts
S Scolioza Member Licensed User Longtime User Feb 9, 2012 #7 Thank you for examples. I have a question i already searched but i didnt find an answer. How can we see the index of an object inside a panel? Have a nice day! Upvote 0
Thank you for examples. I have a question i already searched but i didnt find an answer. How can we see the index of an object inside a panel? Have a nice day!
Erel B4X founder Staff member Licensed User Longtime User Feb 9, 2012 #8 Please start a new thread for this question. Upvote 0