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

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Share Your Creations
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Share Your Creations Show your developed application to Basic4ppc community. Please include source code if possible.

Binomial Calculator

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-30-2007, 05:51 AM
Senior Member
 
Join Date: Apr 2007
Location: Arlington, Washington USA
Posts: 176
Default Binomial Calculator

Original post . . .

I plan to port several of my VB statistics programs over to the PPC using Basic4ppc. Attached is the first on the list, a binomial calculator.

The program is a good example (IMHO) of controlling the appearance of the Table control. When adding rows and columns, the table control will generate scroll bars when the row width exceeds the table width, or the sum of the row heights exceeds the table height. I dislike the appearance of the Table control when the rows and columns do not fill the table dimensions, and the generation of scroll bars messes up the appearance of the whole table.

My solution is to resize the Table control when rows are added. Columns are static, so no redimensioning was necessary in that direction except when the vertical scroll bar is automatically introduced. So for 2 to 9 data rows, the dimensions of the Table increase to just fit the rows so the Table has a nice, clean appearance. When the 10th data row is added, then I stop adding to the height of the control, but I do increase the width by an amount necessary to accommodate the automatically generated vertical scroll bar. Otherwise, a horizontal scroll bar would have been automatically generated and that mucks up the display.

In general, the header row has a different height than the data rows, so you need to know the header row height, the data row heights, the column widths, and the width of the vertical scroll bar if you are to use this method. You can see the values I used in the source code. The PC and the PPC have different values for the header row height, the data row heights, and the vertical scroll bar width. These differences are handled with the cPPC constant so the same source code generates a nice display on both devices.

The values I used work well on my Ipaq 1940. I'd appreciate hearing if it works well on other devices.

-dlfallen
Attached Files
File Type: zip Binomial.zip (2.6 KB, 103 views)
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
MiniMat - Matrix Calculator derez Share Your Creations 11 01-20-2010 06:27 AM
Texas Holdem Calculator Stellaferox Share Your Creations 0 02-22-2008 10:24 PM
Simple Calculator RandomCoder Share Your Creations 8 11-02-2007 12:09 AM
Simple RPN - Calculator token Share Your Creations 4 10-08-2007 01:40 PM
Distance Calculator PatrikL Share Your Creations 7 04-30-2007 06:15 PM


All times are GMT. The time now is 01:00 AM.


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