GUI Problem

Dhairyasheel
Dhairyasheel Altair Community Member
edited October 2020 in Community Q&A

Hi All,

 

I facing Issue in three widgets

1) Change the font of Inputs Dialogue in TK (e.g CAMBRIA , 14)

2) How to assign the values of a dynamically created Entry Box to a list using TCL.

3) How to assign the procedure to the buttons in Dialogue. (OK , APPLY and CANCEL on the dialogue Box situated at the bottom) 

please help me to clarify these doubts.

Best Regards,

Dhairyasheel Desai

<?xml version="1.0" encoding="UTF-8"?>GUI_Issue_Entry.JPG

<?xml version="1.0" encoding="UTF-8"?>InputDialog.JPG

Tagged:

Answers

  • llyle_20499
    llyle_20499 New Altair Community Member
    edited August 2019

    Hi Dhairyasheel,

    1. first create a font with the properties and then assign it to the label you create

     font create myFont -family cambria -size 14  ttk::label .test.frame1.label1 -text 'Hello' -font myFont -width 15

    2. all entry boxes have a variable set using -textvariable which should be a namespace variable, this can be set dynamically and will be reflected accordingly. 

     hwtk::entry frame_1.ent_1 -textvariable ::mynamespace::entry1variable

     

    3. use -command followed by the function while creating the button:

     hwtk::button frame_1.button_1 -text 'test' -command {::test::Myprocedure}

     

  • Dhairyasheel
    Dhairyasheel Altair Community Member
    edited August 2019

     

    Hi Livil,

    Thanks for the Reply. It was very Helpful. :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' /> 

    1 ) My question was about font of INPUT DIALOG

     font create myFont -family cambria -size 14

    'set myanswer [hwtk::inputdialog -title 'Material' -text 'Enter Material Name' -font myFont'.

    2) About Assigning the Procedure to the Default Buttons on the Dialogue Box (OK , CANCEL, APPLY) Please refer to the Images attached.

    Thanks in Advance 

    Best Regards,

    Dhairyasheel 

    Tata Technologies

    <?xml version="1.0" encoding="UTF-8"?>GUI.jpg

    <?xml version="1.0" encoding="UTF-8"?>InputDialog1.JPG

  • Pandurang
    Pandurang Altair Community Member
    edited August 2019

    .dialog buttonconfigure  ok -command {}

  • Dhairyasheel
    Dhairyasheel Altair Community Member
    edited August 2019

    .dialog buttonconfigure  ok -command {}

    Thanks Pandurang..!! :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />