Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Code Samples & Tips Share your recent discoveries and ideas with other users.

panel or form with scrollbar?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-06-2007, 02:46 PM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default panel or form with scrollbar?

Hi,

I'm busy now for day's to find a way to make the form or an panel
larger than the screen size, this can be easly done by choosing the
screen size , but what happends with the form or panel which will
be out of the screen size?, it seems it's still there but you can't
reach it, so a scrollbar should be very usefull, so you don't have
to create an amount of panels or form (on the exact size of the screen
self i mean).
Does there is an way to build an form or panel wich you can reach over
the full length?, like putting an button on the right corner which contains
next or more.. e.t..

I'll hope there is some solution for this, because im writing some text
on the screen which are more rows than the current form or panel can
take.

thanks
Reply With Quote
  #2 (permalink)  
Old 09-06-2007, 03:08 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Quote:
Originally Posted by tvrman View Post
I'm busy now for day's...
You should have asked earlier
You can use a ScrollBar and a panel to achieve it.
Code:
<font face="Courier New"><font size="2"><font color="#0000ff">Sub </font></font></font><font face="Courier New"><font size="2">Globals
</font></font><font face=
"Courier New"><font size="2"><font color="#008000">'Declare the global variables here.
</font></font></font><font face="Courier New"><font size="2"><font color="#0000ff">End Sub
 
</font></font></font><font face=
"Courier New"><font size="2"><font color="#0000ff">Sub </font></font></font><font face="Courier New"><font size="2">App_Start
 Form2.Show
 sb.New1(</font></font><font face=
"Courier New"><font size="2"><font color="#800000">"form2"</font></font></font><font face="Courier New"><font size="2">,</font></font><font face="Courier New"><font size="2"><font color="#800080">220</font></font></font><font face="Courier New"><font size="2">,</font></font><font face="Courier New"><font size="2"><font color="#800080">0</font></font></font><font face="Courier New"><font size="2">,</font></font><font face="Courier New"><font size="2"><font color="#800080">20</font></font></font><font face="Courier New"><font size="2">,</font></font><font face="Courier New"><font size="2"><font color="#800080">270</font></font></font><font face="Courier New"><font size="2">,true)
 sb.Maximum = panel1.Height - form2.Height
</font></font><font face=
"Courier New"><font size="2"><font color="#0000ff"> AddTextBox</font></font></font><font face="Courier New"><font size="2">(</font></font><font face="Courier New"><font size="2"><font color="#800000">"panel1"</font></font></font><font face="Courier New"><font size="2">,</font></font><font face="Courier New"><font size="2"><font color="#800000">"txt1"</font></font></font><font face="Courier New"><font size="2">,</font></font><font face="Courier New"><font size="2"><font color="#800080">10</font></font></font><font face="Courier New"><font size="2">,</font></font><font face="Courier New"><font size="2"><font color="#800080">400</font></font></font><font face="Courier New"><font size="2">,</font></font><font face="Courier New"><font size="2"><font color="#800080">100</font></font></font><font face="Courier New"><font size="2">,</font></font><font face="Courier New"><font size="2"><font color="#800080">25</font></font></font><font face="Courier New"><font size="2">,</font></font><font face="Courier New"><font size="2"><font color="#800000">""</font></font></font><font face="Courier New"><font size="2">)
</font></font><font face=
"Courier New"><font size="2"><font color="#0000ff">End Sub
 
Sub </font></font></font><font face="Courier New"><font size="2">sb_ValueChanged
 panel1.Top = -sb.Value
</font></font><font face=
"Courier New"><font size="2"><font color="#0000ff">End Sub
</font></font></font>
The application and the ScrollBar library are also attached.
Attached Files
File Type: zip ScrollablePanel.zip (3.0 KB, 274 views)
Reply With Quote
  #3 (permalink)  
Old 09-06-2007, 03:18 PM
Knows the basics
 
Join Date: May 2007
Posts: 63
Default

Hi Erel,

Sjee why i didn't ask before this, im searching now for days at the forum,
(im learning too on this).

this is the solution for my project

Let me say many thanks again!
Reply With Quote
  #4 (permalink)  
Old 09-06-2007, 05:05 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Quote:
im searching now for days at the forum
Also, the best place to ask is in the questions forum, not on the samples one....

And of course, we all have learned a new bit with EREL's example...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #5 (permalink)  
Old 09-06-2007, 05:26 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Quote:
Also, the best place to ask is in the questions forum, not on the samples one....
I moved this thread to the Code Samples as it is a good tip for a common problem.
Reply With Quote
  #6 (permalink)  
Old 09-06-2007, 05:39 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

OK, Sorry, I didn't noticed it was a moved post...

My appologies
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #7 (permalink)  
Old 03-03-2011, 06:27 AM
Senior Member
 
Join Date: Jan 2011
Posts: 158
Default Panel GradientDrawable

Hi,
how can I set the via code the background colors Gradientdrawable of a panel?
Thanks in advance
Nicola
Reply With Quote
  #8 (permalink)  
Old 03-03-2011, 09:02 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

I think that your question is for Basic4Android, so your post should be in the Android forum.
If it is for Badic4PPC, Gradientdrawable doesn't exist. You should create a bitmap with the gadient colors and set it to the panel.

Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Panel verschieben in andere Form ? Paulsche German Forum 4 12-31-2008 09:05 AM
Is it possible to set a width of the scrollbar? aeror Questions (Windows Mobile) 2 06-19-2008 10:22 AM
Scrollbar aerohost Basic4ppc Wishlist 1 06-15-2008 02:56 PM
Scrollbar on a Panel willisgt Questions (Windows Mobile) 5 03-10-2008 08:12 PM
possible to add a scrollbar to the textbox? Stellaferox Questions (Windows Mobile) 4 06-16-2007 12:15 PM


All times are GMT. The time now is 10:57 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0