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

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

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Get a input string from user

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-31-2007, 07:11 PM
Junior Member
 
Join Date: Aug 2007
Posts: 16
Question Get a input string from user

There are a function to get a string from user like InputBox or I need to create a form do do this task?
Reply With Quote
  #2 (permalink)  
Old 08-31-2007, 11:44 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

Usually we use a panel with a label describing/asking an input and a textbox for the user to input and a button to trigger the input action....but its also simple to create a custom control (dll) with this function...
__________________
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
  #3 (permalink)  
Old 09-01-2007, 04:56 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Usually we use a panel with a label describing/asking an input and a textbox for the user to input and a button to trigger the input action
For what Cableguy describing above look at this thread http://www.basic4ppc.com/forum/code-samples-tips/108-input-panel.html

Quote:
....but its also simple to create a custom control (dll) with this function...
Hello Cableguy,

It won't be difficult to create a clone of your AboutPanel library (named for example InputBox and using .ShowDialog) to act like a modal InputBox. Think about it, no hurry at all, we all can wait until... this evening

Cheers
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #4 (permalink)  
Old 09-01-2007, 08:18 AM
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

will do!!!
__________________
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-01-2007, 08:22 AM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 592
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by dzt View Post
no hurry at all, we all can wait until... this evening
ha ha ha
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
Reply With Quote
  #6 (permalink)  
Old 09-01-2007, 07:30 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

"Your system will melt down in 10....9...8....7..."


Well, almost.....Got a virus and had to re-install my system.....

That part is done, now I have to re-install and configure all the other apps, including b4ppc and sharpdevelop....

Hopefully I'll have all working by tomorow and start on the imput panel....

In the meantime, please provide some props/features that you would like to see in an input panel, and if possible, a graphical example of how it would look....
__________________
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 09-03-2007, 06:14 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

InputPanel is now in its coding stage, but a doubt has rised....

I learned how to manage button click events inside the class, but how can I pass it to b4ppc?

I have contructed the click event....what do i put inside it? a simple get/set?
__________________
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
  #8 (permalink)  
Old 09-03-2007, 06:22 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Take a closer look at previously posted libraries, inluding ScrollBar at "How to create a Basic4ppc library" thread.
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #9 (permalink)  
Old 09-03-2007, 06:33 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

Code:
'btn1 is the OK button, so it should pass the textbox(txt) value....
private void btn1_Click(System.Object sender, System.EventArgs e)
        {
            get{ 
return txt.text;}
        }
'btn2 is the Clear button, so it should Clear the textbox(txt) value....
private void btn1_Click(System.Object sender, System.EventArgs e)
        {
            txt.text=
""
        }
Would this be correct???

When validating user input, whats the best form of action, to hide the panel or to dispose of it?
__________________
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
  #10 (permalink)  
Old 09-04-2007, 11:24 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Hello,

To show a modal dialog use .showdialog

Code:
<font size="2"><font color="#008000"><b><font size="2"><font color="#0000ff">public </font></font></b><font size="2"><font color="#ff0000">string </font></font><b><font size="2"><font color="#191970">Show</font></font></b><font size="2"><font color="#006400">()</font></font>
<font size=
"2"><font color="#006400">{</font></font>
<font size=
"2"><font color="#000000">  frmInputBox</font></font><font size="2"><font color="#006400">.</font></font><b><font size="2"><font color="#191970">ShowDialog</font></font></b><font size="2"><font color="#006400">();</font></font>
 
<font size=
"2"><font color="#000080">  return </font></font><font size="2"><font color="#000000">StringTypedByUser</font></font><font size="2"><font color="#006400">;</font></font>
<font size=
"2"><font color="#006400">}</font></font>
</font></font>
And to close your InputBox...

Code:
<b><font size="2"><font color="#0000ff">private </font></font></b><font size="2"><font color="#ff0000">void </font></font><b><font size="2"><font color="#191970">btnOK_Click</font></font></b><font size="2"><font color="#006400">(</font></font><font size="2">System</font><font size="2"><font color="#006400">.</font></font><font size="2">Object sender</font><font size="2"><font color="#006400">, </font></font><font size="2">System</font><font size="2"><font color="#006400">.</font></font><font size="2">EventArgs e</font><font size="2"><font color="#006400">) </font></font>
<font size=
"2"><font color="#006400">{</font></font>
<font size=
"2">  frmInputBox</font><font size="2"><font color="#006400">.</font></font><b><font size="2"><font color="#191970">Close</font></font></b><font size="2"><font color="#006400">();</font></font>
<font size=
"2"><font color="#006400">}</font></font>
__________________
Dimitris Zacharakis
http://www.terracom.gr

Last edited by dzt : 09-04-2007 at 11:33 AM.
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
Fast user switching LineCutter Questions (Windows Mobile) 0 10-27-2008 10:37 PM
Input string error on Table.AddRow ohkovar Questions (Windows Mobile) 4 07-17-2008 05:50 AM
A bot as a User? Cableguy Forum Discussion 2 05-24-2008 03:23 PM
Returning subroutine error - Input string was not in the correct format HarleyM Questions (Windows Mobile) 4 10-20-2007 06:45 AM
Input String is wrong format lairdre Questions (Windows Mobile) 2 05-22-2007 07:43 PM


All times are GMT. The time now is 11:10 AM.


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