User Profile

Collapse

Profile Sidebar

Collapse
bjwest
bjwest
Last Activity: Jan 21 '09, 04:28 AM
Joined: Dec 11 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • bjwest
    replied to Invalidated Event On Form Close
    Now I understand.

    In order to catch an event from a child form, the event has to be attached prior to showing the child form. Also, the object triggering the event needs to be public. In this case car has to be defined as public within the child form.

    This code works as should, triggering the event in both forms:

    Form1:
    Code:
    using System;
    using System.Windows.Forms;
    
    namespace EventTest
    ...
    See more | Go to post

    Leave a comment:


  • bjwest
    replied to Invalidated Event On Form Close
    I found exactly what I need here..

    C# calling parent functions from child form - CodeCall Programming Forum

    I just need to declare the listbox as public, and pass the form1 instance to form2 when I create it. Now in form2, I just put this in the button1_click function..

    m_parent.textBo x1.Text = "SWEET!!";

    Whala! Works like I need it to.

    vinci, I'd still like to know what's...
    See more | Go to post

    Leave a comment:


  • bjwest
    replied to Invalidated Event On Form Close
    Sorry vekipeki, I don't understand what you're trying to tell me.

    After further thought, I like the idea of a new class. That way I can update the ListBox whenever I need without closing the form. Looking at what vinci gave me, I created a small two form app to give it a try. Here's what I have:

    Form1:
    Code:
    namespace EventTest
    {
        public partial class Form1 : Form
        {
            Car car
    ...
    See more | Go to post

    Leave a comment:


  • bjwest
    replied to Invalidated Event On Form Close
    Thank you Vinci,

    I found that during a google search for this, but I think it's a bit more complicated than I need. All I need is a simple way to let the main form know that it needs to redraw a listbox when the other form closes ( or when the OK button the the other form is clicked.)

    Is there no way of doing this without creating a complete new class?
    See more | Go to post

    Leave a comment:


  • bjwest
    started a topic Invalidated Event On Form Close

    Invalidated Event On Form Close

    I have an application that uses multiple forms with one form constantly open. I need to be able to refresh a control of the main form when one of the other forms closes. Is there a way to generate an Invalidated event on a control in the main form when I close the other?
    See more | Go to post

  • bjwest
    replied to Word Wrap in CheckBox Text?
    SaiLove, the CF checkbox does not have a multiline attribute. Anything after a newline is ignored and doesn't show in the textfield.

    I got around this by creating my own custom control mentioned above. Right now, I'm trying to figure out how to resize the control when the vertical scrollbar is visible to prevent the horizontal scrollbar from being displayed.

    This is a personal project I'm working that I've had to...
    See more | Go to post

    Leave a comment:


  • bjwest
    replied to Word Wrap in CheckBox Text?
    Thanks nukefusion. I looked all through the compact frameworks CheckBox object and couldn't find anything that would do any kind of autosizeing. The CF is way limited, compared to the standard toolset. I understand they have to save space on the mobile devices, but you'd figure with smart phones being able to switch between portrait and landscape, they'd see the need for this ability. I guess I'm going to have to create a custom object.
    ...
    See more | Go to post

    Leave a comment:


  • I recently got an AT&T Tilt (HTC 8925) mainly for the price ($99 referb.) I was looking at the Pantech Duo as well. I liked the fact the Pantech has separate slide out keyboard and numberpad, but the screen on that was just too small for me.

    I like the Tilt, although in hindsight, I'm wishing I'd gotten something with a bit larger screen. I don't text, so the keyboard, which was a selling point at the time, is not really as...
    See more | Go to post

    Leave a comment:


  • bjwest
    started a topic Word Wrap in CheckBox Text?

    Word Wrap in CheckBox Text?

    I know it's possible to wordwrap in a TextBox, but is it possible to do so in a CheckBox? This is a Win Mobile device, and the screen width is quite limited. I need the text wrapped, if longer than the width of the box, rather than truncated.

    Is this possible, or am I going to have to create a custom object for this?
    See more | Go to post

  • Thank You!

    Thank you nukefusion. The Compact Framework (I'm developing for Windows Mobile) doesn't have the CheckedChanged event. It's called CheckStateChang ed. Why they change the names of things, I don't know. It looks like it does nothing other than making porting over difficult.

    This is how the code looks now, and it works as it should:

    Code:
            public void Add_CheckBox(String CBText)
    ...
    See more | Go to post

    Leave a comment:


  • I'd like it to act he same as a non dynamic checkbox would:

    Code:
            private void checkBox1_CheckStateChanged(object sender, EventArgs e)
            {
                if (checkBox1.Checked)
                    checkBox1.Font = StrikeoutFont;
                else
                    checkBox1.Font = NormalFont;
    The thing is, I can't figure out how to replace the 'checkBox1' with the dynamicly produced...
    See more | Go to post

    Leave a comment:


  • Getting status of dynamic checkbox (WIndows Mobile SDK)

    I'm writing a windows mobile app that uses dynamiclly created checkboxes. I'm having trouble getting the checked status.

    Code:
            public void Add_CheckBox(String CBText)
            {
                CheckBox MyCheckbox = new CheckBox();
                MyCheckbox.Location = new System.Drawing.Point(4, CB_Row * 20);
                MyCheckbox.Name = "MycheckBox" + CB_Row;
                MyCheckbox.Text = CBText;
    ...
    See more | Go to post
No activity results to display
Show More
Working...