It is currently Tue Apr 25, 2017 11:25 am



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: how to mimic the VB tab in rfo-basic
Unread postPosted: Wed May 18, 2016 11:58 am 
Offline
User avatar

Joined: Sun May 19, 2013 10:53 am
Posts: 509
here the code to mimic a tab folder (so often used in visual basic). Use the include file "Incl_Tab_Like.bas" and use the code snippet posted to learn how to use it. touch the tab_tail to chanche folder and used the variable "Tab_Index" to change the page in your program.

Code snippet:
Code:
include "../../Test_tab/Incl_Tab_Like.bas"

tab_text$ = "This is page : "
gr.color 255,255,255,255,1
gr.rect rtt, 300,300,1000,500
gr.text.align 2
gr.text.size 70
gr.color 255,0,0,0,1
gr.text.draw tt, 640,420,""

do
pause 1
if tab_index > 0 then gosub update
until 0

end

update:
gr.modify tt,"text",tab_text$+ trim$(format$("##",tab_index))
tab_index=0
gr.render
return

end

!================================================

OnGrTouch:

do
GR.TOUCH touched, xx0, yy0
until touched

Let xx0                      = xx0 / SW
Let yy0                      = yy0 / SH

DO
pause 1
GR.TOUCH touched, xx1, yy1
UNTIL !touched

Let xx1                      = xx1 / SW
Let yy1                      = yy1 / SH

gosub decode

Gr.onGrTouch.Resume

end


Here the screen_shot and the zipped include. By the way, adjust the path in the snippet as per your need.

Cheers

Alberto


Attachments:
Incl_Tab_Like.zip [1.21 KiB]
Downloaded 77 times
tab_like.png
tab_like.png [ 28.31 KiB | Viewed 1197 times ]

_________________
Don't be afraid of the time passing by, the best is yet to come
Report this post
Top
 Profile  
 
 Post subject: Re: how to mimic the VB tab in rfo-basic
Unread postPosted: Wed May 18, 2016 12:54 pm 
Offline
User avatar

Joined: Tue Sep 13, 2011 4:58 am
Posts: 720
Location: Sao Paulo, Brasil
Neat. Very good Alberto.

_________________
Alfredo Peine

-------------

Hisense Sero 7 Pro (Tegra 3 7" rooted tablet - Android 4.4.4) / Moto G 3rd Gen (5" quad core rooted phone - Android 6.0).


Report this post
Top
 Profile  
 
 Post subject: Re: how to mimic the VB tab in rfo-basic
Unread postPosted: Thu May 19, 2016 3:49 am 
Offline
User avatar

Joined: Sun May 19, 2013 10:53 am
Posts: 509
Thank you Alfredo

Alberto

_________________
Don't be afraid of the time passing by, the best is yet to come


Report this post
Top
 Profile  
 
 Post subject: Re: how to mimic the VB tab in rfo-basic
Unread postPosted: Mon May 23, 2016 2:57 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1128
Location: From Blighty
I never got to VB Alberto, but I did try your code.

Tabs on Android is an interesting idea!

Mog


Report this post
Top
 Profile  
 
 Post subject: Re: how to mimic the VB tab in rfo-basic
Unread postPosted: Mon May 23, 2016 2:39 pm 
Offline
User avatar

Joined: Sun May 19, 2013 10:53 am
Posts: 509
Mog you are my official code tester! :D

Thanks for testing it.

Alberto

_________________
Don't be afraid of the time passing by, the best is yet to come


Report this post
Top
 Profile  
 
 Post subject: Re: how to mimic the VB tab in rfo-basic
Unread postPosted: Sat Feb 11, 2017 5:18 pm 
Offline
User avatar

Joined: Sun May 19, 2013 10:53 am
Posts: 509
Uploading again the zipped file and the picture that were corupted somehow from original post!


Attachments:
20170212011116.png
20170212011116.png [ 21.25 KiB | Viewed 580 times ]
Incl_Tab_Like.zip [1.21 KiB]
Downloaded 33 times

_________________
Don't be afraid of the time passing by, the best is yet to come
Report this post
Top
 Profile  
 
 Post subject: Re: how to mimic the VB tab in rfo-basic
Unread postPosted: Mon Feb 20, 2017 10:29 am 
Offline
User avatar

Joined: Sat Mar 26, 2016 9:23 am
Posts: 65
Clicking on the attachment link says the attachment doesn't exist any more...
??


Report this post
Top
 Profile  
 
 Post subject: Re: how to mimic the VB tab in rfo-basic
Unread postPosted: Mon Feb 20, 2017 11:41 am 
Offline
User avatar

Joined: Mon Aug 18, 2014 1:16 pm
Posts: 1317
Hi cavelamb

I just tried and it down loaded ok; so you could try it again.

Roy


Report this post
Top
 Profile  
 
 Post subject: Re: how to mimic the VB tab in rfo-basic
Unread postPosted: Mon Feb 20, 2017 7:02 pm 
Offline
User avatar

Joined: Sun May 19, 2013 10:53 am
Posts: 509
Cavelamb download the file attached to my last post. The first post does'nt work anymore.

Alberto

_________________
Don't be afraid of the time passing by, the best is yet to come


Report this post
Top
 Profile  
 
 Post subject: Re: how to mimic the VB tab in rfo-basic
Unread postPosted: Sat Feb 25, 2017 9:07 pm 
Offline
User avatar

Joined: Sat Mar 26, 2016 9:23 am
Posts: 65
Got it.
I tried the first post first.
Silly me!


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
suspicion-preferred