Menu

#40 I can't update dialog title

v1.0_(example)
open
nobody
3
2021-05-20
2021-05-20
No

Hi, here is what I done (under linux, obviously):

function main()
...
public oForm, cTitle, cMessage
...
oMessage=" "
cTitle=" "
INIT DIALOG oForm CLIPPER NOEXIT TITLE cTitle FONT oFont ;
     ....
      @ 20,10 say oMessage SIZE 220,32
     ...
     other_function()
     ...
Activate Dialog oForm
...
return nil
//------------------
static other_function()
local cstdOut, 
oMessage = "some string"
cTitle = "a modified title"
...
if oForm:title == " "
   oForm:title=cTitle
   oForm:refresh()
   qout(cTitle)
else
   qout(oForm:title)
endif

when starting cTitle = " ", and the dialog is created with a blank title
When executing other_function(), as oForm:title == " ", it sets oForm:title to cTitle, but the title isn't set
In all other pass, it display the content of oFrom:title which is now no more " ", but like cTitle.
Why does the new title isn't displayed, and is-it possible ?

Thanks
A+

~~~

Discussion

  • Aupeix Alain

    Aupeix Alain - 2021-05-20

    Hi, I tried to use SetTitle() as for hwindow, and, even I didn't found it in hdialog, it works.

    So, you can close this post.
    Sorry for the noise
    A+

     
  • Aupeix Alain

    Aupeix Alain - 2021-05-20

    So, I modify progress.prg which now needs two parameters which are passed in a txtfile named what (like for the first version). These two parameters are on two lines.
    In this case the title and the message are displayed.
    If there is only one line, or that the first line is finished by a chr(10), the title is set to 'Dialog'

    I made this modification because the title was fixed when building (french for me), and when I launched HwMake Linux choosing en_US , when using progress, the title wasn't in english ...
    Now, its the caller program (HwMake Linux) which give the translated title.

    This tool is the one used with the trackbar
    See https://sourceforge.net/p/hwgui/bugs/52/

    A+

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.