The Glade 4.0

"Turn the lights down, the party just got wilder."
It is currently Sun Nov 24, 2024 12:53 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Tab Order
PostPosted: Sat Jan 29, 2011 8:13 pm 
Offline
Grrr... Eat your oatmeal!!
User avatar

Joined: Wed Sep 02, 2009 11:07 pm
Posts: 5073
I am trying to set up a Tab Order for a form I am designing for class. When I open the tab order stuff it starts with 0 then the sub categories are 0.1 and up then 1, 1.0 and up, etc.

Which determines the priority order? Would 0 get the priority or it is high to low?

_________________
Darksiege
Traveller, Calé, Whisperer
Lead me not into temptation; for I know a shortcut


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Jan 29, 2011 11:26 pm 
Offline
Sensitive Ponytail Guy
User avatar

Joined: Fri Sep 04, 2009 10:18 pm
Posts: 2765
Typically, low to high.

_________________
Go back to zero, take a pill, and get well ~ Lemmy Kilmister


Top
 Profile  
Reply with quote  
 Post subject: Re: Tab Order
PostPosted: Sun Jan 30, 2011 2:23 am 
Offline
Grrr... Eat your oatmeal!!
User avatar

Joined: Wed Sep 02, 2009 11:07 pm
Posts: 5073
now... if I may ask a follow up question:

I have a field that is entered with an integer... and when you check a radio button it sets a second text box (hidden) with a value.

Now when I click a button it unhides a DiplayText, which I am trying to populate as follows:
Code:
DisplayText.Text = Val(TimeText.Text) + Val(OffsetBox.Text)


The issue I am encountering is that in order to actually show any text in the box I need to manually place my cursor in the window and press any key. Once I do this it displays as expected.

Isn't there a way to automatically display the data without the need to go into the field that way?

_________________
Darksiege
Traveller, Calé, Whisperer
Lead me not into temptation; for I know a shortcut


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jan 30, 2011 11:24 am 
Offline
Sensitive Ponytail Guy
User avatar

Joined: Fri Sep 04, 2009 10:18 pm
Posts: 2765
Depends on the language. If you're doing this in some flavor of VB, Application.DoEvents might be what you need. If it's not related to VB, you'll need someone else's advice cuz that's the only language I'm currently familiar enough with to offer assistance.

_________________
Go back to zero, take a pill, and get well ~ Lemmy Kilmister


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jan 30, 2011 4:00 pm 
Offline
Grrr... Eat your oatmeal!!
User avatar

Joined: Wed Sep 02, 2009 11:07 pm
Posts: 5073
my apologies... yeah I am using VB 2010

_________________
Darksiege
Traveller, Calé, Whisperer
Lead me not into temptation; for I know a shortcut


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jan 30, 2011 5:49 pm 
Offline

Joined: Thu Sep 03, 2009 10:03 am
Posts: 4922
I think you need to move the code that sets the text to within the event callback that happens when you click the radio button.

If this doesn't help, you could paste all your code within a [spoiler ][code ][/code ][/spoiler ] and I could probably help you better.


Top
 Profile  
Reply with quote  
 Post subject: Re: Tab Order
PostPosted: Mon Jan 31, 2011 12:40 am 
Offline
Grrr... Eat your oatmeal!!
User avatar

Joined: Wed Sep 02, 2009 11:07 pm
Posts: 5073
Spoiler:
Code:

Public Class GMTConverter

    Private Sub ExitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitButton.Click
        ' Exits the Project

        Me.Close()
    End Sub

    Private Sub ClearButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClearButton.Click
        ' Clear the contents of text boxes and radio buttons

        TimeText.Text = ""
        DisplayText.Text = ""
        OffsetBox.Text = ""
        PlusEightRadio.Checked = False
        PlusSevenRadio.Checked = False
        PlusSixRadio.Checked = False
        PlusFiveRadio.Checked = False
        PlusFourRadio.Checked = False


        ' Hides the Display Label
        DisplayText.Visible = False

        'Hides the Picture Box
        PicBox.Visible = False
    End Sub


    Private Sub DisplayButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayButton.Click
        ' Displays the updated time settings per the radio button selected

        ' Shows the Display Label
        DisplayText.Visible = True
        Me.DisplayText.Refresh()

        ' Shows the Picture Box
        PicBox.Visible = True
    End Sub

    Private Sub PlusEightRadio_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PlusEightRadio.CheckedChanged
        ' Displays the PST display and sets the PST timezone

        PicBox.Image = My.Resources.LAClock
        OffsetBox.Text = Val(8)
    End Sub

    Private Sub PlusSevenRadio_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PlusSevenRadio.CheckedChanged
        ' Displays the MST/PDT display and sets the MST timezone

        PicBox.Image = My.Resources.AzClock
        OffsetBox.Text = Val(7)
    End Sub

    Private Sub PlusSixRadio_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PlusSixRadio.CheckedChanged
        ' Displays the CST/MDT display and sets the CST timezone

        PicBox.Image = My.Resources.ChicagoClock
        OffsetBox.Text = Val(6)
    End Sub

    Private Sub PlusFiveRadio_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PlusFiveRadio.CheckedChanged
        ' Displays the EST/CDT display and sets the EST timezone

        PicBox.Image = My.Resources.BostonClock
        OffsetBox.Text = Val(5)
    End Sub

    Private Sub PlusFourRadio_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PlusFourRadio.CheckedChanged
        ' Displays the EDT display and sets the EDT timezone

        PicBox.Image = My.Resources.globe
        OffsetBox.Text = Val(4)

    End Sub

    Private Sub DisplayText_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayText.TextChanged
        ' Displays the GMT conversion of the initial text based on the selected radio button

        [b]DisplayText.Text = Val(TimeText.Text) + Val(OffsetBox.Text)[/b]

    End Sub
End Class


The bolded part is what is not refreshing until I enter the field and press a key.

Other than this automatic update, the only other thing I want to figure out is how to use the same form to display a xxx time to UTC conversion. But I will get to that later

_________________
Darksiege
Traveller, Calé, Whisperer
Lead me not into temptation; for I know a shortcut


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Jan 31, 2011 9:38 am 
Offline
Sensitive Ponytail Guy
User avatar

Joined: Fri Sep 04, 2009 10:18 pm
Posts: 2765
Interesting. I'd have gone with a single event for changing the value of the radio button group, with a switch statement to test the value of the group and set the text accordingly. Using separate events for each button is an approach I wouldn't have come up with.

In response to the problem you're actually having ... the only place I see in your code in which the value of DisplayText.Text gets changed is within the event that's triggered by the change to said value. I recommend altering the event to be triggered when the value of OffsetBox.Text is changed, since that's what will be modified each time a radio button is clicked.

_________________
Go back to zero, take a pill, and get well ~ Lemmy Kilmister


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Jan 31, 2011 10:32 am 
Offline
Deuce Master

Joined: Thu Sep 03, 2009 9:45 am
Posts: 3099
I'm not sure why that behavior occurs. I created a small form with a textbox and a button. Textbox was set with Text of 1 and Visible = False. I set an event to make the textbox Visible the same way you did it, and it works without having to click in there. We're still using Visual Studio 2005 at work though and it doesn't seem to have that Me.DisplayText.Refresh() method.

No weird defaults as far as fonts go?

_________________
The Dude abides.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Jan 31, 2011 12:22 pm 
Offline

Joined: Thu Sep 03, 2009 10:03 am
Posts: 4922
I think the issue is that Me.DisplayText.Refresh() does not cause DisplayText_TextChanged() to happen.

You should put this code:


DisplayText.Text = Val(TimeText.Text) + Val(OffsetBox.Text)

in DisplayButton_Click where Me.DisplayText.Refresh() is.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Jan 31, 2011 4:00 pm 
Offline
Grrr... Eat your oatmeal!!
User avatar

Joined: Wed Sep 02, 2009 11:07 pm
Posts: 5073
Thank you guys so very much.

Lex, that did exactly what I wanted it to.

_________________
Darksiege
Traveller, Calé, Whisperer
Lead me not into temptation; for I know a shortcut


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 169 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group