Jump to content
Xtreme .Net Talk

closet geek

Members
  • Posts

    21
  • Joined

  • Last visited

closet geek's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. It seems to be something like that, I've had a go at forcing other things to have focus before the tab gets removed but it's not working well... I do think you're right however, but it looks like a work around is needed.
  2. I have a strange issue which I can't track down, I'm starting to think it could be a bug in J#. I have an app with a RichTextBox that displays the contents of a text file a user opens. Once the user opens one file they have the option to open another in a new tab (with another RTB on it). The issue appears to be with the: tabControl1.set_SelectedTab(); method. If I specify that once that second tabPage is created that it should be "selected" using the above code the contents in the RichTextBox on that new tabPage gets scrolled to the bottom... If I don't select the new tab as it is created but manually click on the tab instead the contents of the RichTextBox doesn't scroll to the bottom. Any ideas?
  3. How do you simulate a button being clicked by the user in C# or J#? I have a button called "Button1" and it performs a task when the user clicks on it. How do I then say "pretend the user has clicked Button1" from a different method so that the actions of Button1 can be invoked by the software. So simple I imagine but I can't spot it.
  4. I have a checkbox_changed event. Inside that event I have two for loops, one performs the exact opposite action of the other (e.g. if one painted a textbox black the other would paint it white). When the checkbox is checked by the user I want one of the loops to run, when it is unchecked I want the other loop to run. How do I go about doing that?
  5. I've triple checked and can't see it in J# but I have found out that you're supposed to use something like this: // Change the value of the second element in the ArrayList. myArray.set(1, new Integer(4)); instead. I'll give it a whirl. Thanks!
  6. myArray.Insert() doesn't exist as far as I can see (maybe a C# only thing?) This is proving quite tricky for me!
  7. Thanks Cags. I wonder how do I add an item to a specific place in the ArrayList?
  8. That's really all over my head. I've never used an ArrayList before I can't seem to make head nor tail of the helpfile from Visual Studio either. How would I create an ArrayList to hold say Strings for instance? How would I implement something like this: array[intcounter] = string; using ArrayLists instead of a normal Array.
  9. Perhaps? I'm not sure on that. How would that ensure uniqueness?
  10. Hi, I have code that creates a new tab and adds it to a Form. Every time a new tab is created I would like a FileSystemWatcher event to be created to monitor the file that is loaded into a RTB on that tab. The issue I have is the Watchers aren't unique. Everytime a new tab is opened the old Watcher gets overwritten by the new one. How do I define a FileSystemWatcher which has a name which can be increased or changed everytime my "create a new tab" code is run? Something like a simple counter that gets increased everytime the code is run, the FileSystemWatcher's name could then be set to the counters current total. How would I do that? Or does anyone have a neater solution. J# would be best, but I can probably understand C# too. Thanks.
  11. Got it working thanks!
  12. Thank you once again for helping out, but I'm struggling to implement your suggestion in j#. There is no TabIndexChanged or IndexChanged method(?) for tabControl1 - I tried using Focus() instead as that would produce the same results (at a guess). However it just comes back with the error "Identifier Expected" and I'm a bit stumped. Sorry if these questions are a bit dumb.
  13. Sounds about right, but how do I create a function that is always listening for that event? :)
  14. Hi, I had a look but couldn't find any thread which matched. I want to know how to implement a method that listens for a change of tab (e.g. someone clicks from one tab to a different tab) and for that click to trigger an event. J# would be ideal, C# is fine, VB probably wont help me see what to do I'm afraid :p Thanks.
×
×
  • Create New...