Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2003
    Posts
    69

    Post it notes App

    Hi,
    as a non-programmer trying to learn a little programming while creating a small app for myself, I am attempting to create a post-it notes style program. Most of the many available have way more functions then I want or don't function the way I would like, so I am trying to make my own.
    Could someone tell me the basic flow I will need to create in order to do this? I just want a general outline that I could attempt to figure out on my own.
    The functionality I am looking for would be a simple text box that sits on your desktop that you could type into. Hitting a button or key combo would then save the note. But to create the next note, I don't want to open a new text box, just continue typyng in the same one but the program would see it as a seperate entity. Maybe each note would have a box around it?
    Also, once the box was filled I would need to make scrollbars appear.

    So far I have figured out that I need an input box to type into, but am not sure how to save the text so that it will display when I run the program again.

    TIA for any suggestions.

  2. #2
    Join Date
    Jul 2003
    Posts
    712
    Hello,

    If I understand what you want to do, place the following script in the respective events:

    Put this code on the On Shutdown event of your project:
    Code:
    sText = Input.GetText("Input1");
    Application.SaveValue("Post-It-Note", "Whatever_Key", sText);
    Put this code on the On Startup event of your project:
    Code:
    sText = Application.LoadValue("Post-It-Note", "Whatever_Key");
    Input.SetText("Input1", sText);
    Hope that helps!

  3. #3
    Join Date
    Jan 2003
    Posts
    69
    That doesn't seem to work for some reason.
    Also I noticed that the input box doesn't seem to wrap text so it isn't very useful displaying text.
    Could I somehow grab the text from the input box and hit a button to display it in a listbox object?
    Is it possible to write to a XML file somehow to save the data?

  4. #4
    Join Date
    Jan 2003
    Posts
    69
    OK,
    Here is what I have done so far.
    I have an input box where I type my note. I then click a button to send it to a list box. This works just like I want, except...
    If the note is too long the listbox doesn't wrap it. I couldn't find any hint of how to do this so as a work around I tried making it work so that if you clicked on a note in the listbox, it would write it to a second input box (the only object I could find that would wrap text). I am trying to do this like this:

    listnumber = ListBox.GetSelected("ListBox1");
    listxt = ListBox.GetItemText("ListBox1", listnumber);
    Input.SetText("Input2", listxt);

    But this is not producing any output to the input2.

    Any ideas how I can do this, or a better approach over all?

  5. #5
    Join Date
    Nov 2003
    Location
    Salzburg / Austria
    Posts
    312
    Hi,

    >> If the note is too long the listbox doesn't wrap it. <<
    Did you Enable Multiline in the Input Object?

    listnumber = ListBox.GetSelected("ListBox1");
    listxt = ListBox.GetItemText("ListBox1", listnumber);
    Input.SetText("Input2", listxt);

    "ListBox.GetSelected" returns a table so you have to use an index
    listxt = ListBox.GetItemText("ListBox1", listnumber[1]);





    Stefan

  6. #6
    Join Date
    Jan 2003
    Posts
    69
    The multiple lines is on in the input, it just doesn't transfer that way to the list.
    The change you suggested in grabbing the list item contents worked. Thanks.
    The next problem is, how do I save the list items to read back in when I launch the program again?

  7. #7
    Join Date
    Nov 2003
    Location
    Salzburg / Austria
    Posts
    312
    One way to save the info is to work with files.



    Stefan
    Attached Files

  8. #8
    Join Date
    Jan 2003
    Posts
    69
    That looks like it will do the trick. And much simpler too.
    That probably took you all of 5 minutes to put together too I bet. After I have struggled for hours trying to do it.
    Oh Well, I learned alot anthat was the intent.
    Thanks for all your help!

  9. #9
    Join Date
    Jan 2003
    Posts
    69
    One more thing...
    How could I delete a note as well as the txt file that stores it's content.?
    This would allow titles that reflected the contents, rather then just reusing note_001, note_002....
    And how could you make it work by pressing the "delete" key?

  10. #10
    Join Date
    Jan 2003
    Posts
    69
    Nevermind, I figured it out.
    Holy crap, I actually figured it out!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts