Как установить неизменяемый размер окна

Вопросы программирования и использования MSEide + MSEgui.

Модератор: Модераторы

Сообщение amateur » 21.04.2008 10:52:05

Но мне нуно всего одна штука: я установил максимальное и минимально значения размера окна и окно меня слушает (в иде это и есть. т.е. при разработке я нажимаю развернуть и окно аккуратно перемещается в левый угол (Х = 0) но размеры не меняет, а приложение разворачивается и плевать ему на ограничения).

Ребята, попробуйте сами и увидете... Может я не так как нужно описал проблемку.

Пробую все в винде......
Аватара пользователя
amateur
энтузиаст
 
Сообщения: 552
Зарегистрирован: 03.08.2007 10:15:32

Сообщение Attid » 21.04.2008 11:24:11

optionswindow попробывал ?
Аватара пользователя
Attid
долгожитель
 
Сообщения: 2585
Зарегистрирован: 27.10.2006 17:29:15
Откуда: 44°32′23.63″N 41°2′25.2″E

Сообщение amateur » 21.04.2008 12:05:22

Конечно. Всего 4 св-ва. Каждое хорошее, но желаемого эфекта нет.

wo_popup - убирает границы и кнопки;

wo_message - показывает чет типа диалога (ну забыл как называется такой тип окна) и при двойном клике разворачивается;

wo_buttonend.. - без понятия зачем (эффект одинаков);

wo_groupleader - аналогично.

И при чем тут св-ва в иде то работает.......
Аватара пользователя
amateur
энтузиаст
 
Сообщения: 552
Зарегистрирован: 03.08.2007 10:15:32

Сообщение amateur » 21.04.2008 12:16:38

ссори 5 св-в (на работе почемут стоял 1.6). Юмор одинаков.
Аватара пользователя
amateur
энтузиаст
 
Сообщения: 552
Зарегистрирован: 03.08.2007 10:15:32

Сообщение Attid » 21.04.2008 17:10:20

And what's the problem if the user wants to maximize the form?


Мартин не любит правит проблемы если они не машают его идеалогии.
с этим остается или мирится или править самому.
Аватара пользователя
Attid
долгожитель
 
Сообщения: 2585
Зарегистрирован: 27.10.2006 17:29:15
Откуда: 44°32′23.63″N 41°2′25.2″E

Сообщение amateur » 21.04.2008 17:49:32

Интересно: а зачем тогда вводить ограничение размера окна (че здеся такого?). Пользователь не хочет этого, он хочет растягивать окно как угодно :)
Аватара пользователя
amateur
энтузиаст
 
Сообщения: 552
Зарегистрирован: 03.08.2007 10:15:32

Re: Как установить неизменяемый размер окна

Сообщение amateur » 06.05.2008 10:18:04

Прикольно, на расстановку и пристыковку трачу больше времени чем в других средах (уже привыкать начал, но). Свойство Align - такое нужное дело, а его нет.
Да и геморой по поводу окон тоже имеется. Начал осваивать мс в лине. Классно работает.
Посмотрел проги, как они работают (есть там диалоги, есть неизменяемый размер окна (КДЕ и ГНОМ), есть все что нуно). Почему Мартин считает что окно в виде диалога не нужно. Не понимаю. Хотя мона понять - сложно, но сама иде - сложноватое дело. Но меня добивает одно: почему в иде работает как нужно а в проге нет??? Может это можна пояснить.

Кста, сетка в лазаре (лин) у меня так прикольно работает. Закачаться мона... Такие тормоза при выводе данных.

Праздники достали.....................
Аватара пользователя
amateur
энтузиаст
 
Сообщения: 552
Зарегистрирован: 03.08.2007 10:15:32

Re: Как установить неизменяемый размер окна

Сообщение Attid » 06.05.2008 12:11:58

amateur писал(а):Может это можна пояснить.

я спрашивал ответа не поступило, докучать Мартину мне не охото, так как мне не нужно, да и решается это 2 строками кода.

amateur писал(а):Кста, сетка в лазаре (лин) у меня так прикольно работает. Закачаться мона... Такие тормоза при выводе данных.

гтк1 наверно ?
Аватара пользователя
Attid
долгожитель
 
Сообщения: 2585
Зарегистрирован: 27.10.2006 17:29:15
Откуда: 44°32′23.63″N 41°2′25.2″E

Re: Как установить неизменяемый размер окна

Сообщение debi12345 » 06.05.2008 14:31:22

Прикольно, на расстановку и пристыковку трачу больше времени чем в других средах (уже привыкать начал, но). Свойство Align - такое нужное дело, а его нет.

Ну, Мартин сразу "tlayouter" сделал - на самые извращенные расстановки и выравнивания.

Кста, сетка в лазаре (лин) у меня так прикольно работает. Закачаться мона... Такие тормоза при выводе данных.

Наверное, сетка к датасету привязана и синхронно с ним заполняется. В МСЕ тоже тормоза были - пока не засунулми заполнение грида между "dataset.DisableControls" & "dataset.EnableControls".

Добавлено спустя 10 минут 29 секунд:
Краткое описание лэйаутера-а:

Код: Выделить всё
tlayouter
    * a tspacer descendant designed to (auto)resize or/and move
     its contained widgets acc to some size/positon dependencies
   * may have GUI look, frame caption etc switched off by default
   * layouters may be nested to achieve copmplex layouts

   Each layout change/assignment is divided into performing 2 consequent stages :


   Stage 1:

   - if {lao_placex OR lao_placey} :

      = if {plo_scalesize in optionslayout}  then
         * widgets with "osk_nopropwith" unset in their "optionsskin" are h-scaled
             in the proportion of change of tlayouter's clientwidth
         * widgets with "osk_nopropheight" unset in their "optionsskin" are v-scaled
             in the proportion  of change of tlayouter's clientheight

         For h-resized layouter, the effect looks like :

           |--Widget__1---Widget__2--|      => the initial look

            |--Widget_1--Widget_2--|         => the layouter gets narrower

            |---Widget___1---Widget___2---|   => the layouter gets wider

         *** both widget sizes & margins are affected ***
         *** Widget_N may generally situate on different y-levels ***
           
   otherwise :

      = if lao_scalewidth in optionslayout :
         * widgets with "osk_nopropwith" unset in their "optionsskin" enters in the mode
            ( not applied until the layouter resizes! ) when they are h-scaled in the proportion
            as far as clientwidth of the tlayouter changes, then stages 2 & 3 are reapplied

         For h-resized layouter, the effect looks like :

           |--Single____widget????|      => the initial look

           |--Single__widget???|         => the layouter gets narrower

           |--Single_______widget?????|   => the layouter gets wider

         * also, if {lao_scaleleft in optionslayout} then left margins of the widgets
           with unset "optionsskin.osk_nopropleft" resize too otherwise retain

      = if lao_scaleheight in optionslayout :
         * widgets with "osk_nopropheight" unset in their "optionsskin" enters in the mode
            ( not applied until the layouter resizes! ) when they are v-scaled in the proportion
             as far as clientheight of the tlayouter changes, then stages 2 & 3 are reapplied

         * also, if {lao_scaletop in optionslayout} then top margins of the widgets
           with unset "optionsskin.osk_noproptop" resize too otherwise retain

         *** only widget sizes & margins not distances between them are affected ***

   Stage 2:

      Widgets may be auto resized against themselves not the layouter
      in 5 consequent steps using the following options:

      - if plo_syncmaxautosize in place_options :

         = all widgets are autosized then their client areas are
           syncronized to the clientareas of the highest and the widest of the widget

           * calls "msegui.syncmaxautosize"

        - if plo_syncpaintwidth in place_options :

             = the paintwidths of all widgets are synchronized to the widget
               with the widest outer frame width ( ex. width of "frame.caption" )
           
              * mainly makes sense if "lao_alignx" set and {align_glue = wam_start or wam_end} ( see below )
                when the widgets will be adjusted in order to fit into
                the inner client width of tlayouter:

               x-aligh level 
                     V
                | Widget_1 the_widest_frame_caption1|
                | Widget_2 norm_frame_caption2      |
                | Widget_N wider_frame_captionN     |

            here, the effect is shown for "cp_right" frame captions

                // otherwise syncronizes to the outer ( of the frame except its caption ) width
                // of the Z-top widget
             

              * calls "msegui.syncpaintwidth"
              * paintwidth is the outer width

        - if plo_syncpaintheight in place_options :

             = the paintheights of all widgets are synchronized to the widget
               with the highest outer frame width ( ex. width of "frame.caption" ).

              * mainly makes sense if lao_aligny set and {align_glue = wam_start or wam_end} ( see below )
                the widgets will be adjusted in order to fit into
                the inner client height of tlayouter :

            +------------------------------+
                | The_                         |
                | tallest_            taller_  |
                | frame_    frame_    frame_   |
                | caption   caption2  captionN | 
                |                              |
            | Widget1   Widget_2  Widget_N |<== y-align level              

            here, the effect is shown for "cp_topleft" frame captions

                // otherwise syncronizes to the outer ( of the frame except its caption )
                // height of the Z-top widget
       

              * calls "msegui.syncpaintheight"

      - plo_synccaptiondistx in place_options :
         = causes all widgets to have the widest common room for their cp_(left/right)* frame captions

           * calls "msegui.synccaptiondistx"

      - plo_synccaptiondisty in place_options :
         = causes all widgets to have the highest common room for their cp_(top/bottom)* frame captions

           * calls "msegui.synccaptiondisty"

   Stage 3:

      the widgets may be (re)arranged/sized against the layouter & between the widgets :

      There're 2 modes of such (re)arrangement which can be partially ( orthogonally ) combined ( see later ):

      1) the place(ment) mode ( lao_place* in optionslayout ) :

         - widgets are placed at some distances between each other, possibly with some margins,
           rooms of invisible widgets ( having visible=false) are also allocated
           unless "plo_noinvisible in place_options"

             * the widgets are placed in the order of decreasing their "widgetrect.x/y" coordinates before alignment

           * the inter-widget distances and the side margins ( if apllied ) in both dimentions
             are identical and limited between "place_mindist" and "place_maxdist"

            = if {lao_placex in optionslayout} and
              {place_mode <> wam_none}
              then the following relevant settings aplly :

               * non-limiting value of "place_maxdist" :

                  # |Widget_1------Widget_2------Widget_3|

               * non-limiting value of "place_maxdist" and
                 {plo_propmargin in place_options} :

                  # |---Widget_1---Widget_2---Widget_3---|

               * limiting value of "place_maxdist" and
                 {place_mode = wam_start} :

                  # |Widget_1----Widget_2----Widget_3????|

               * limiting value of "place_maxdist" and
                 {place_mode = wam_start} and
                 {plo_propmargin in place_options} :

                  # |---Widget_1---Widget_2---Widget_3???|

               * limiting value of "place_maxdist" and
                 {place_mode = wam_end} :

                  # |??????Widget_1---Widget_2---Widget_3|

               * limiting value of "place_maxdist" and
                 {place_mode = wam_end} and
                 {plo_propmargin in place_options} :

                  # |???Widget_1---Widget_2---Widget_3---|

               * limiting value of "place_maxdist" and
                 {place_mode = wam_center} :

                  # |???Widget_1---Widget_2---Widget_3???|

               * limiting value of "place_maxdist" and
                 {plo_endmargin in place_options} :

                  # |Widget_1----Widget_2----Widget_____3|,
                  or
                  # |Widget_1----Widget_____2----Widget_3|,
                  or
                  # |Widget_____1----Widget_2----Widget_3|,
                  
                  here, the most left amongst widgets having both [an_left,an_right] set is expanded
                  otherwise the most right widget ( Widget_3 in the example )

               * limiting value of "place_maxdist" and
                 {place_mode = wam_end} and
                 {plo_propmargin in place_options} and
                 {plo_endmargin in place_options} :
                  
                  # |--Widget_1--Widget_____2--Widget_3--|,

               The legend:

                  limiting value
                  of "place_maxdist" : such value which produce
                                  some visuall effect on the layouter
                  "----" : distance ( = number of minuses, limited by place_maxdis )
                  "????" : some remaining space ( = number of questmarks )
                  "Widget_1" : widget of the original size
                  "Widget__..__1" : (auto)resized widget

            = if {lao_placey in optionslayout} and
              {place_mode <> wam_none}
              then the things are handled in the same manner as with "lao_placex"
              but for the vertical "top2bottom" direction of placement instead of
              the horizontal "left2right" one
             

      2) the align(ment) mode ( optionslayout.lao_align* ) :

         - widgets are gathered into a visual group to a dedicated "leader" widget of the layout
              ( set by "align_leader" and defaults to the lowest in Z-Order = twidget.widgets[0] )
           the leader stays in place while the others :

            = if lao_alignx in optionslayout ( the hor alignment mode ):
               * if align_mode = wam_start : snap their left borders to the left border of leader
               * else if align_mode = wam_end : snap their right borders to the right border of leader
               * else if align_mode = wam_center : snap their v-axes to the v-axis of leader

            after that,

            = if lao_aligny in optionslayout ( the vert alignment mode ):
               * if align_mode = wam_start : snap their top borders to the top border of leader
               * else if align_mode = wam_end : snap their bottom borders to the bottom border of leader
               * else if align_mode = wam_center : snap their h-axes to the h-axis of leader
            
         - after that, the whole widget group can be aligned within the layouter:

            = if align_glue =  wam_start

               * if lao_alignx in optionslayout:
                  # the left extent of group snaps to the left border of layouter
                  # if {plo_synpaintwidth in place_option} then the widgets of group may be h-squeezed so that not to extrude beyond the layouter
                    ( as if they have both left & right anchors unset )

               * if lao_aligny in optionslayout:
                  # the top extent of group snaps to the top border of layouter
                  # if {plo_synpaintheight in place_option} then the widgets of group may be v-squeezed so that not to extrude beyond the layouter
                    ( as if they have both top & bottom anchors unset )

            = else if align_glue = wam_end

               * if lao_alignx in optionslayout:
                  # the right extent of group snaps to the right border of layouter
                  # if {plo_synpaintwidth in place_option} then the widgets of group may ne h-squeezed so that not to extrude beyond the layouter
                  ( as if they have both left & right anchors unset )

               * if lao_aligny in optionslayout:
                  # the bottom extent of group snaps to the bottom border of layouter
                  # if {plo_synpaintheight in place_option} then the widgets of group may be v-squeezed so that not to extrude beyond the layouter
                    ( as if they have both top & bottom anchors unset )

            = else if align_glue =  wam_center
               * if lao_alignx in optionslayout: the v-axis of group snaps to the v-axis of layouter
               * if lao_aligny in optionslayout: the h-axis of group snaps to the h-axis of layouter

      Mutually exclusive settings:

         * only one of "align_mode" can be choosen
         * only one of  "glue_mode" can be choosen
         * "optionslayout.lao_alignx" &    "optionslayout.lao_placex"
         * "optionslayout.lao_aligny" &    "optionslayout.lao_placey"

      V-alignment ( optionslayout.lao_aligny ) may be combined
      with h-placement ( optionslayout.lao_placex ), and
      h-alignment ( optionslayout.lao_alignx ) may be combined
      with v-placement ( optionslayout.lao_placey )

      !!! The effects of the above described { resizing / placement / alignment } are irreversible.
      So, the only way to revert is to set "wan_none" then to revert manually !!!

  ============================
 
  The external interface :

   TWidget stuff:
   
      - name
      - anchors
      - bounds
      - color
      - enabled
      - visible
      - <face> : see {any face}
      - <frame> : see {any frame}
       - hint
       - helpcontext
       - tag
       - taborder
       - cursor
       - optionswidget
       - optionsskin
       - popupmenu
   
      twidget's event handlers:
   
         - on(de)activate
         - onbeforeupdateskin
         - onafterupdateskin
         - onchildscaled
         - onfontheightdelta
         - on(de)focus
         - onenter
         - onmove
         - onpopup
         - onresize
         - onshowhint
     
   align_glue :
     ( outer anchoring mode for widget group, in the align mode )
      - wam_none
      - wam_start
      - wan_center
      - wm_end

   align_leader :
      the widget ( incl another spacer, splitter or layouter ) against which the aligment applies ( the reference widget )

   align_mode :
     ( inner anchoring mode within widget group, in the align mode )
      - wam_none
      - wam_start
      - wan_center
      - wm_end

// Place mode:

     
   place_mindist, place_maxdist:
      - in the place(ment) mode, limits distance between widgets
        ( these distance once calclated also define side margins if aplicable )

   place_mode:
     ( outer anchoring mode for widget group, in the place mode )
      - wam_none
      - wam_start
      - wan_center
      - wm_end

   place_options:
      - plo_endmargin
         = to resize a widget so that it "eats" extra space if it occurs
         
         * only applicable in the place mode, with a limiting value of "place_maxdist" and:

           1) {place_mode <> wam_none}
         or
           2) {place_mode = wam_end} and {plo_propmargin in place_options}

         For the exact look, see above


      - plo_propmargin
         = виджеты расставляются теснее так, чтобы образовались отступы перед Рё после,
           причем расстояние между центрами виджетов было Р±С‹ таким же,
           как Рё растояние между серединами крайних виджетов Рё соотв. границами Р·РѕРЅС‹ расстановки

      - plo_syncmaxautosize
         = see above

      - plo_synccaptiondistx
         = see above

           * affects widgets with opposite cp_left/right set as well   
           * the minimal before-adjustment "captiondist" amongst all widgets limits "captiondist" for each of the widget
              * don't set cfo_captiondistouter here !

      - plo_synccaptiondisty
         = see above

           * affects also widgets with opposite cp_top/bottom set   
           * the minimal before-adjustment "captiondist" amongst all widgets limits "captiondist" for each of the widget

              ! here, don't set "cfo_captiondistouter" for affected widgets !

      - plo_syncpaintwidth
         = see above

      - plo_syncpaintheight
         = see above

      - plo_scalesize
         = see above


   dist_left, dist_right, dist_top, dist_bottom :
      = margins between most outer edge the layouter and
        the corresponding linked widget

      * see "tspacer" for detail

   linkleft,linkright,linktop,linkbottom : see "tspacer"

   options:
      - spao_glueright, spao_gluebottom:
         = set the adjustment dependencies between the layouter an its link_* widgets

         * see "tspacer" for more details

   // which mode of widget placement to apply - see above
   optionslayout:
      - lao_alignx
      - lao_aligny
      - lao_placex
      - lao_placey
      - lao_scalewidth
      - lao_scaleheight
      - lao_scaleleft
      - lao_scaletop
      
      * lao_place* & lao_align* can't be combined for one direction

   optionsscale:
    
     * cause the layouter to provide full space for the widgets as long as they expand/shrink/move

      - osc_expandx
         = allocates more h-space if needed

      - osc_shrinkx
         = removes extra h-space if occured

      - osc_expandy
         = allocates more v-space if needed

      - osc_shrinky
         = removes extra v-space if occured

      - osc_invisishrinkx
         = fully h-collapses the layouter if "visible=false" ( run-time only )

      - osc_invisishrinky
         = fully v-collapses the layoter if "visible=false" ( run-time only )

   optionsskin:
      = see <any widget>


   Methods:

      constructor create(aowner: tcomponent); override;

Аватара пользователя
debi12345
долгожитель
 
Сообщения: 5752
Зарегистрирован: 10.05.2006 23:41:15
Откуда: Ташкент (Узбекистан)

Re: Как установить неизменяемый размер окна

Сообщение Attid » 06.05.2008 15:37:25

debi12345 писал(а): - plo_propmargin
= виджеты расставляются теснее так, чтобы образовались отступы перед и после,
причем расстояние между центрами виджетов было бы таким же,
как и растояние между серединами крайних виджетов и соотв. границами зоны расстановки

боюсь с кодировкой не угадал =)
Аватара пользователя
Attid
долгожитель
 
Сообщения: 2585
Зарегистрирован: 27.10.2006 17:29:15
Откуда: 44°32′23.63″N 41°2′25.2″E

Re: Как установить неизменяемый размер окна

Сообщение amateur » 12.05.2008 14:02:28

Гтк 2. Прорисовку сетки может и исправят. Тама не только с сеткой прикол (прорисовка странная почти у всех визуальных компонент). Но это не есть к теме.

Мне интересно: почему в иде окно реагирует как нужно, а прога нет???
Аватара пользователя
amateur
энтузиаст
 
Сообщения: 552
Зарегистрирован: 03.08.2007 10:15:32

Пред.

Вернуться в MSEide + MSEgui

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1

Рейтинг@Mail.ru