Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1

    Default Ahh Another C# problem


    mga bro nag start na mi windows application!!! hehehe...The task is user will input value of the index and the index where it should be place....para mas clear attached a pic here



    pag click anang button sa insert group box kay mo display siya sa iyang corresponding array location na textbox....ahh ka lisod...how are u going to assign a value sa textbox if user inputed man...dba ana man na

    textboxname.text="blahblahblah?"......ahh im really confused...any help would be appreciated guyz

  2. #2
    bro try ug google ... adding textboxes/controls dynamically.

  3. #3
    wa ko kasabot kaayo sa imo gusto mahitabo bradix... elaborate more daw..

  4. #4
    @brandon tnx for the suggestion bai...search it but wala koy na sabtan...sorry suwayan lang nako balik unya...hehehe

    @xander
    ay sry nag student mode pa ko ganiha....ang gi kalibugan ra nko bai xander kai unsaon pag display sa text na gi input sa "value" textbox on the corresponding index na gi butang...for example type siya sa value: "50" dayun index: 0,2...i display niya first row 3rd column ang text na "50"...cant imagine gyud unsaon niya pangita sa corresponding text box

  5. #5
    "cant imagine gyud unsaon niya pangita sa corresponding text box"

    depende ra cguro sa name assignment sa imong mga textboxes.. textbox 00, textbox 01, etc.
    or basin dili textbox imong kelangan gamiton.. kanang murag table style nga naa pud cya index2x.

  6. #6
    create nalng og 2D array of Textbox ex:

    Textbox[][] txtbox = new TestBox[noRows][noCols];
    .
    .
    //somewhere in the codes
    int row= //user entered row num
    int col= //user entered col num
    value = //user entered value

    //pa display sa textbox
    textbox[row][col].text=value;

  7. #7
    textbox[row][col] this is the name of the textbox? ok ill try it

    Edit not valid man daw bro...idont think u can put [row][col] as a name for the textbox
    Last edited by Deathnote; 07-23-2009 at 07:49 AM.

  8. #8
    why not just input directly on your cells sa grid.. and make those cells sa grid as textbox?? kaysa hasul2x pa ka buhat ug Insert, Index/Value na form sa kilid... wala na di na kailangan na.. unless naa jud ka specific reason para ana..

    just my two cents..

  9. #9
    yah mao mang gud na ang instruction sir...para mura ma show how 2d array works

    questions about this codes sir

    Textbox[][] txtbox = new TestBox[noRows][noCols]; <--where do u declare this one? if sa insert na button it will always declare it every time he clicks the insert button?
    .
    .
    //somewhere in the codes
    int row= //user entered row num
    int col= //user entered col num
    value = //user entered value

    //pa display sa textbox
    textbox[row][col].text=value; <----it displays an error that textbox does not exist
    Last edited by Deathnote; 07-23-2009 at 08:19 AM.

  10. #10
    Quote Originally Posted by Deathnote View Post
    Textbox[][] txtbox = new TestBox[noRows][noCols]; <--where do u declare this one? if sa insert na button it will always declare it every time he clicks the insert button?
    No declare it ones ra, sa constructor ba..hehe actually la pko ka try og code sa c#..la ko kibaw onsaon pg initialize og 2d array sa c#.. pero assume java og c# pariha ra:

    Code:
    for(int row=0; row<noRows; row++){
        for(int col=0; col<noCols; col++){
              yourTxtbox[row][col] = new JTextField();
        }
    }
    Quote Originally Posted by Deathnote View Post
    //pa display sa textbox
    textbox[row][col].text=value; <----it displays an error that textbox does not exist
    variable name rana instead og txtbox

  11.    Advertisement

Page 1 of 3 123 LastLast

Similar Threads

 
  1. Another C# Problem: Data Picker
    By Deathnote in forum Programming
    Replies: 4
    Last Post: 10-06-2009, 06:36 AM
  2. another problem....huhuh
    By parts in forum Computer Hardware
    Replies: 23
    Last Post: 01-07-2008, 03:51 PM
  3. Connecting to another PC via dial-up ( problems )
    By EarlZ in forum Networking & Internet
    Replies: 7
    Last Post: 01-07-2006, 12:16 AM
  4. Another Day in Paradise
    By n`gel in forum Music & Radio
    Replies: 20
    Last Post: 11-02-2005, 11:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top