Home   Help Search Login Register  

Author Topic: To set scrollbars on a html (or strucured-text)-control  (Read 2223 times)

0 Members and 1 Guest are viewing this topic.

Offline Denisko-Redisko

  • Members
  • *
At first it seemed to me that arma2 scrollbar can be set for any control.
Having looked at the config i was a bit disappointed, scrollbar is set for a controls-group, it draws a scrollbar when it contains controls of larger size, than itself.
(see: configFile >> "RscDisplayDiary", or "AddOns\ui\config.cpp")

It is the same as it was before, in ArmA1. And the main problem is that when we want to have scrollable html-control or strucured-text-control we need to know it actual size that depends on volume of the loaded text (htmlLoad or ctrlSetStructuredText).

Not especially hoping for success, I tried to set scrollbar classes (Scrollbar, VScrollbar, HScrollbar), for other controls, but it didn't work.

Somebody knows, how it works ingame, or how it can be workaround? Any ideas.
« Last Edit: 23 Sep 2009, 20:41:17 by Denisko-Redisko »
sorry for my english

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: To set scrollbars on a html (or strucured-text)-control
« Reply #1 on: 20 Sep 2009, 22:03:46 »
It did fail for me too  :dry:

Offline Clayborne

  • Members
  • *
Re: To set scrollbars on a html (or strucured-text)-control
« Reply #2 on: 12 Nov 2011, 18:59:44 »
So you can't have a scrollbox with a structured text control? I've been trying to add a scrollbar to a text box and it was maddening enough without any proper documentation anywhere on how to do it. But then I find this and discover it was all for nothing anyway. Anyone ever worked this out?

Offline Denisko-Redisko

  • Members
  • *
Re: To set scrollbars on a html (or strucured-text)-control
« Reply #3 on: 15 Jan 2013, 01:01:19 »
if you only know the actual vertical size of text, you can do it
Code: [Select]
class RscYourDisplay {
    ...
    class controls {
        class ControlsGroup : RscControlsGroup {
            class VScrollbar {
                width = 0.019;
            };
            class controls {
                class YourTextControl : RscStructuredText {
                    // it vertical size of text page
                    h = 100;
                };
            };
        };
    };
};
« Last Edit: 15 Jan 2013, 01:03:30 by Denisko-Redisko »
sorry for my english