Hi David,

    I was in a hurry when I responded this morning and as usual pay a price. 
Chip is correct and in my Cuckoo Clock program I set the time of an alarm using 
the Static Text area.
    I set that text when i move into the dialog and it is inside a group and 
there are 2 groups and one for hour and another for minute.

    So the Group label is based on the text area and is what you need. So your 
group surrounds that entire area and the Static Label stays there inside that 
group.

    I have below a copy of what I had placed in the dialog inside my xml file 
which has several dialogs to choose from.
    So as I had said, get the main dialog ID for that static text area and just 
write to that area while you are on the fly.

        Bruce


<dialog id="myTimeDialog" sysmenu="yes" minimize="no">
 Edit Time
 <group orientation="vertical" width="250" id="grp_timervalues">
  <static id="txt_cmb_hour" width="group" shortcut="h"> Hour </static>
  <group orientation="vertical">
   <combobox id="cmb_hour">
   </combobox>
  </group>
  <static id="txt_cmb_minute" width="group" shortcut="m"> Minute </static>
  <group orientation="vertical">
   <combobox id="cmb_minute">
   </combobox>
  </group>
  <static id="txt_cmb_AmPm" shortcut="t" enabled="no"> AM or PM </static>
  <group orientation="vertical">
   <combobox id="cmb_ampm">
   </combobox>
  </group>
  <group>
   <button id="btn_combo_save" widthclass="btn"> Save </button>
   <button id="btn_combo_cancel" widthclass="btn" width="+10"> Cancel </button>
  </group>
 </group>
</dialog>


  Sent: Monday, January 27, 2014 3:32 AM
  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.
http://www.avast.com

Reply via email to