David,
  set to "Personal", and at another case, it could be set to "Publicly".
      The best solution is the place the title inside each control text field, 
in other words, "Public: Control Name"

      This is the best, on the fly, solution.
      In my Cuckoo Clock program all menu items are changed based on the 
editing of each and the return from the dialog also updates the menu item 
name...
  So do this based on your conditions:
     dObj.Text = Replace(dObj.Text, "Personal: ", "Publicly: ")


  or

     dObj.Text = Replace(dObj.Text, "Publicly: ", "Personal: ")


  I added the colon for easy read on the fly and that your string would have 
only one replacement or add 1 at the end of the replace statement.

          Bruce





    Subject: Re: Changing the Group Text on the fly, for a dialog


    Thanks Chip.
    Actually, I ended up doing what you suggested, in using a Static. Yet it is 
not really the greatest idea. Thing is, the static is locked to one control - 
like an Edit box. Now, in the group in question, I have currently three 
controls, and a couple more will be added this weekend. Benefit of the 
Group.Text, is that when you tab through the different Controls in the group, 
the screen reader will read to you, the Group.Text. Thereby, you as an 
end-user, will be reminded what the control is going to do, and what 
information it will affect. In a project like the one I am currently on, it 
will have some impact, whether the user is filling in info that is going to 
affect only some local features, or if he is going to affect more widely 
activity. That was why, I thought I could have used the Group.Text. And, since 
you - on the fly - can change the Title, or Text, of the whole Dialog, and any 
other elements that I have worked with, it somehow surprised me the Group.Text 
could not be changed right on the go. I have one more backup solution in mind, 
which I will be testing tomorrow or something, and if it works, I will let the 
community know. Guess my example could be useful also for other projects.

    Thanks again, to everyone who responded both on- and off-list. All feedback 
help in pulling together a solution that will work the best for the End-User.
      ----- Original Message -----
      From: Chip Orange
      To: [email protected]
      Sent: Tuesday, January 28, 2014 9:57 PM
      Subject: RE: Changing the Group Text on the fly, for a dialog


      Hi David,



      I had a look at the group control in the object manual, and it has no 
properties listed.  I had a look at it in the xml designing portion of the 
manual, and it says this:

      "A group is not a standard control. It is, instead, merely a conceptual 
container

      that the Window-Eyes XML dialog engine uses to arrange controls in an 
aesthetically

      pleasing manner. "





      Therefore, I believe it's not a control, and doesn't have any properties, 
even though I haven't written any test procedure myself to verify this.  I did 
once try enabling and disabling a group in my own project, and it seemed to 
have no effect (I got no errors, but it made no difference to the controls in 
the group).



      One thing you could try though, which would come very close to simulating 
what you described, would be to start with a group with no caption text defined 
for it, but add a static control at the top to hold the changeable text.  You 
might start it out containing some very long string of text, so that no matter 
what you changed it to, there would be room enough in the groupbox for the new 
string.





      Hth,



      Chip





      From: David [mailto:[email protected]]
      Sent: Monday, January 27, 2014 3:33 AM
      To: [email protected]
      Subject: Changing the Group Text on the fly, for a dialog



      Hey guys,

      I have a Dialog, with several Groups defined and setup in the XML file. 
All that is great, and I have entered an individual ID for each Group. So, for 
instance, I will have the following Group IDs:

          Group_RetrieveInfo

          Group_SaveInfo

          Group_ExitingControls



      Ok, what I want to do, is to change the Text property of one of the 
Groups - dynamically within my code. That is, based on some other activity and 
the state of some of the controls in the dialog, I want - let's say - the Text 
property of Group_SaveInfo to change. At one point, it could be set to 
"Personal", and at another case, it could be set to "Publicly".



      I have tried the following inside my EventHandler function, but keep 
getting an error. Guess, because the Group is not part of the Control 
collection. But then, what is the correct syntax, please?



      ' Code Snip-it:

      If DObj.Control( "Checkbox_Personal" ).Checked Then

              DObj.Control( "Group_SaveInfo" ).Text = "Personal"    ' This line 
gives an error, that the DObj.Control is not valid.

      Else

             DObj.Control( "Group_SaveInfo" ).Text = "General Public"

      End If

      ' Snip-it concludes.



      Thanks for any corrections you may have for the above.



      Regards,

      David




------------------------------------------------------------------------------
          This email is free from viruses and malware because avast! Antivirus 
protection is active.




---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com

Reply via email to