Jump to content
Xtreme .Net Talk

ballisticnylon

Avatar/Signature
  • Posts

    83
  • Joined

  • Last visited

About ballisticnylon

  • Birthday 03/09/1974

Personal Information

  • .NET Preferred Language
    VB.NET

ballisticnylon's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Re: IExtenderProvider Ah, great. Thanks.
  2. Hi there everybody, Today I was playing around with the Flow Layout Panel control (it's a panel that governs the layout of the controls it contains, moving their locations so controls don't overlap). Anyway, any control that is added to a Flow Layout Panel gets a new property, FlowBreak. I've noticed that this property is settable in the Property Grid in the designer, but not in code. I guess my (very general) question is, what's going on here? How does a parent control add a property to its' children, is it a real property that belongs to the child, and finally (and most importantly) how can I write a container control that does the same thing? Thanks in advance, people. This stuff is confusing. bn
  3. I got it working with an asp textbox. Thanks for your help!
  4. That's a good start. I could do something like that in javascript, and then execute that script inside an event handler. But I'm not trying to set the input's property, I'm trying to expose the input's value as a read-only property of the containing .ascx control. If I could execute the javascript in C# or VB.NET and have it return a value (most likely a string), that would be ideal.
  5. Hi everyone, I'm making a simple user control that encapsulates some javascript that I found online (the javascript is a pop-up calendar that writes the selected date to an html input tag). The script will not work if runat="server" is added to the tag, nor will it work if I try to use a textbox instead. I'd like to be able to expose the selected date as a property of the control I'm making, but I'm having trouble finding a way to access the value of the input tag programatically. Any ideas?
  6. Hello, Is there an accepted way to 'push' data to a client browser? In other words, to have the client recieve some data and update its' display without refreshing the page? I have a datagrid that I want to display some live data. I also have a webservice that exposes the data in question. Currently the client browser consumes that webservice once per second and updates its' datagrid. but this strikes me as horribly inefficient. I was just wondering if there's a standard practice for going about such a thing. Any help greatly appreciated.
  7. Wow. So the idea behind an interface is that any of my classes can implement it, and I won't have to detect the type at all, I just pass in the interface. I thank you for causing an a-ha moment. I gotta learn more about this stuff. But I want to ask, was there something wrong or inefficient about detecting the type of a passed object? Why is what you're describing better? It would seem to me that (in your example code) every class that implements ICityProvider and has the comment "really return a list of cities for X" would be repeating a lot of code from the other classes. The whole point of having a recursive sub was to reuse that logic.
  8. Basically, I have defined a nested class structure (things within things within things). Then I have a recursive sub that determines the type of object that gets passed in and calls itself for each object that the passed object contains. The following code fills _Cities with all the cities contained by the passed object, whether it's the world, a country, state, or county. Private _Cities as CityCollection Private Sub GetAllCities(ByVal O as object) Select Case O.GetType.Name Case "World" For each cntry as Country in directcast(O, World).Countries GetAllCities(cntry) Next Case "Country" For each s as State in directcast(O, Country).States GetAllCities(s) Next Case "State" For each co as County in directcast(O, State).Counties GetAllCities(co) Next Case "County" For Each c as City in directcast(O, County).Cities _Cities.add(c) Next Case "City" _Cities.Add(directcast(O, City)) End Select End Sub Select Case O.GetType.Name feels like a klooge, though.
  9. Let's say that I have a function that gets passed in an object, and deals with it according to it's type. Which is the better way? Private Sub DoSomething(ByVal O as Object) If TypeOf(O) Is apple Then ' do something ElseIf TypeOf(O) Is orange Then ' do something else End If End Sub or Private Sub DoSomething(ByVal O as Object) Select Case O.GetType.Name Case "apple" ' do something Case "orange" ' do something else End Select End Sub For some reason, you can't do Select Case O.GetType.
  10. I'm trying to write a simple color-picker that will run in a browser. So far I've got a dropDownList populated with the names of known colors. I'd like to have each ListItem also have a small box filled with the appropriate color. I know how to do this in a Windows Forms environment, but I'm at a loss as to how to accomplish the same thing in ASP.NET. Has anyone out there ever done anything similar to this?
  11. I want to have my application play a .wav file, but I don't want to have to install that .wav file to a place where the user could have access to/move it. Has anyone out there already found a way to embed a .wav file in the .exe, and then summon it up and play it? 8000+ classes and I have to wrap an API to play a sound. An oversight if you ask me. I want something like System.Media.Wav.Play!!! I must be spoiled. :rolleyes:
  12. I think it's System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceStream
  13. you wouldn't really be adding items, just concatenating additional text. Textbox1.Text = "Thing1" Textbox1.Text &= " Thing2" Is that all you meant?
  14. Dim pbr As New ProgressBar Me.StatusBar1.Controls.Add(pbr)
  15. You could just have a boolean flag called movingRight, and then use that to determine how to move your button. Why don't you post what you have so far, and maybe someone will be able to help you.
×
×
  • Create New...