Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3742 Widoki

Dear all,

I'm struggling with the abovementioend topic since yesterday. Although I found several hints in this forum as well as other froum I still got no solution.

I would like to put the focus on a specific page of a notebook according to a certain stage of a process. Of course it works with the "autofous"-parameter inside the XML-descirption of the view. But then always the same page will be "autofocussed". Did I oversee something in the documentation which allows passing an bool expression for the "autofocus"-parameter?

I also tried to control the autofocus for a page from within the Python-file of the model - like this:

        doc = etree.XML(res['arch'])
        ann_field = doc.xpath("//page[@name='inspection']")
        if ann_field:
            ann_field[0].set("autofocus""autofocus")
        res['arch'] = etree.tostring(doc)
        return res


Unfortunately this didn't work for setting the autofocus parameter of a page. Obviously, the set-method is never reached because the preceding doc.xpath()-call does not provide the reference to the widget...

I tried to set the text of a label by using this method and it worked well. After playing around for a while trying other things I don't have any further idea of how to solve the problem. Can somebody of you give me an advice?

Any help is greatly approciated.

Many thanks in advance and greeting from Northern Germany!

Carl




Awatar
Odrzuć

Hello Carl,
did you find a solution to this?

Powiązane posty Odpowiedzi Widoki Czynność
0
cze 23
2104
0
sty 25
722
2
lut 24
1391
1
sty 23
5381