Конференция "KOL" » KOL v 3.00 [Delphi, Windows]
 
  • QAZ (04.10.10 22:33) [60]

    > Приведите пример bitbtn на API, чтобы было только манифеста
    > достаточно. Может я просто чего не так понял с этим контролом.

    BCM_SETIMAGELIST

    > Приведите пример grоupbox на API, чтобы не было зачеркивания
    > метки.

    не в курсе о чем реч, но в винде то проблем не возникает ,значит можно Ж)
  • MTsv DN (05.10.10 10:46) [61]
    >> По поводу combobox + XPSTYLES - нужен InitCommonControls
    > Проверю.

    Действительно. Почему не знаю.
    Для себя в kol.pas сделал так:
    initialization
    InitCommonControls;
    {$IFDEF GRAPHCTL_XPSTYLES}

  • MTsv DN (05.10.10 11:04) [62]
    >> Приведите пример bitbtn на API, чтобы было только манифеста достаточно. Может я просто чего не так понял с этим контролом.
    >
    > BCM_SETIMAGELIST

    Снимаю шляпу. До этого не докопал.
    Посмотрю что получится. Единственное, что меня смущает, что для каждого состояния кнопки нужно будет свое изображение (hot, disable, enable), наверное, а это соответственно размер. Сейчас, хоть и велосипед, с одним имэйджем.

    >> Приведите пример grоupbox на API, чтобы не было зачеркивания метки.
    >
    > не в курсе о чем реч, но в винде то проблем не возникает,значит можно Ж)

    Не могу ссылку пока найти.
  • MTsv DN (05.10.10 11:50) [63]
    При переходе на новый MCK теряются закладки TabControl'a
  • QAZ (05.10.10 12:47) [64]

    > нужно будет свое изображение (hot, disable, enable), наверное

    необязательно если картинка одна то она на все состояния
    также есть выравнивание по любому краю текста и картинки
  • QAZ (05.10.10 12:53) [65]

    > Например, 100 контролов на форме будут тормозить однозначно.
    >  Графических - не будут

    а нафига вменяемому прогеру стока контролов? мошт ему тогда чемто другим заняца Ж)
    я непротив графических контролов в принципе,т.е. конкретно самодельных, но вот перерисовывать стандартные.... вобщем хз
  • Vladimir Kladov © (05.10.10 15:50) [66]
    нафига вменяемому прогеру стока контролов?
    У меня тормоза были заметны на 16 эдитах (и паре комбобоксов), которые отображали состояние регистров эмулируемого процессора, в режиме трассировки это мешало. Речь не об одиночном нажатии, когда все просто перерисовалось один раз, а о трассе или удержании кнопки типа F8.

    100 контролов, это совсем не предел, если сложная форма ввода. Требование на число полей ввода в форме определяет не программист, а заказчик. Ему требуется, чтобы было 100, значит, надо делать 100.

    И как уже говорилось visual styles давно уже для других целей. В VCL групбокс перерисовывает код из VCL еще с тех пор, когда это был Borland Delphi. В API его делать - перечеркивается, если прозрачный. Так что проблемы есть.

    Решение с BCM_SETIMAGELIST плохо тем, что оно действительно только с XP. На работе я работаю с NT4 и Windows2K, например. Впрочем, для картинки на кнопке есть способы и получше, чем bitbtn. Для чего имеется MouseTransparent в KOL и AcceptChildren в MCK. Это решение вообще универсальное, и под темами XP кнопка по теме, и под NT4 кнопка с картинкой и классическая одновременно.
  • MTsv DN (05.10.10 18:25) [67]
    2 QAZ
    Владимир, кстати, прав. Темы-то появились в ХР, но bitbtn и в более ранних версиях нужен...

    2 Кладов
    Владимир, вот еще один баг, в довесок к [63]. Если табконтрол на дочерней форме, то при закрытии формы во второй раз вылет с ошибкой 204.
    Тестовый проект: http://zalil.ru/29772139
    Для получения бага надо: нажать кнопку первый раз, закрыть доч.окно, нажать еще раз кнопку и закрыть окно (при закрытии вылет).

    2 All
    В дополнение к [63]. Закладки не теряются, просто MCK генерит другой код. Восстановление закладок вручную:
    1. В dfm-файле с табконтролом заменить все таб-панели на таб-страницы. Например:
    object TabControl1_Tab1: TKOLPanel


    ->
    object TabControl1_Tab1: TKOLTabPage


    2. В inc-файле формы, например, Unit2_1.inc, добавить константы табов и заменить строку создания табконтрола (я делал все это из бэкапа, у кого нет то ручками).
    Например:
    const _TabControl1_Tab0 = 0; // Name Первой Закладки В Старом Проекте
    const _TabControl1_Tab1 = 1;  // Name Второй Закладки В Старом Проекте


    Result.TabControl1 := NewTabControl( Result.Form, [  ], [  ], nil, 0 ).SetAlign ( caClient );


    ->
    Result.TabControl1 := NewTabControl( Result.Form, [ 'Tab0', 'Tab1' ], [  ], nil, 0 ).SetAlign ( caClient );

  • Vladimir Kladov © (05.10.10 20:04) [68]
    С табконтролом я протормозил. Как-то так получилось, что во всех проектах он не использовался. Дело, однако, не в том, что код иначе генерируется, и если Вы помните, исправлять код в UnitXXX_1.inc бессмысленно, т.к. этот код генерируется в MCK.

    Пока решение именно такое: открыть руками dfm (в блокноте), найти объекты закладок на уровне, следующем за объектом TKOLTabControl, и переименовать их тип из TKOLPanel в TKOLTabPage. После этого открыть проект и на вопрос Delphi, следует ли скорректировать декларации, ответить утвердительно.

    Надо попробовать сделать автоматическую конвертацию.
  • MTsv DN (06.10.10 10:41) [69]
    2 Кладов
    А что по поводу вылета при закрытии доч.формы с табконтролом?
  • Vladimir Kladov © (06.10.10 16:50) [70]
    Не вылетело. Или давайте примерный код.

    Я выложил 3.00.B - kol.zip и mck.zip - миграция TabControl полу-автомат. Образуется некоторое число пустых закладок с теми же заголовками, их надо удалить вручную. Полностью автоматическое удаление дает странные результаты: все компилируется и сохраняется, но после повторного открытия формы какой-то затык, и форма не создается. Не стал разбираться глубоко, такой вариант, я думаю, вполне приемлем.
  • MTsv DN (06.10.10 20:21) [71]
    2 Кладов
    Какой код? Я тестовый проект дал. Сообщение [67]. И описание проблемы.
  • Vladimir Kladov © (06.10.10 21:21) [72]
    Да, я его скачивал. Но нет, пока не смотрел. Вроде и правда падает. Завтра смотреть буду.
  • Jon © (07.10.10 03:21) [73]
    Version 3.00 does not work with ActiveKOL

    Result with v2.94++:


    dcc32.exe -b ActiveKOL.pas

    Borland Delphi Version 15.0
    Copyright (c) 1983,2002 Borland Software Corporation
    KOLDEF.INC(233)
    KOLDEF.INC(233)
    delphidef.inc(48)
    delphicommctrl.inc(1569)
    KOL_ansi.inc(2307)
    KOL_ansi.inc(2307)
    KOL_ASM.inc(13239)
    KOL.pas(62866)
    KOLDEF.INC(233)
    KOLDEF.INC(233)
    err.pas(1198)
    KOLComObj.pas(2353)
    KOLDEF.INC(233)
    ActiveKOL.pas(2624)
    89670 lines, 0.62 seconds, 15415 bytes code, 112 bytes data.



    Result with v3.00b:


    dcc32.exe -b ActiveKOL.pas

    Borland Delphi Version 15.0
    Copyright (c) 1983,2002 Borland Software Corporation
    KOLDEF.INC(253)
    KOLDEF.INC(253)
    delphidef.inc(48)
    delphicommctrl.inc(1569)
    KOL_ansi.inc(2307)
    KOL_ansi.inc(2307)
    KOL_ASM.inc(15343)
    KOL.pas(63340)
    KOLDEF.INC(253)
    KOLDEF.INC(253)
    err.pas(1198)
    KOLComObj.pas(2353)
    KOLDEF.INC(253)
    ActiveKOL.pas(315) Error: Field or method identifier expected
    ActiveKOL.pas(316) Error: Field or method identifier expected
    ActiveKOL.pas(317) Error: Field or method identifier expected
    ActiveKOL.pas(318) Error: Field or method identifier expected
    ActiveKOL.pas(319) Error: Field or method identifier expected
    ActiveKOL.pas(320) Error: Field or method identifier expected
    ActiveKOL.pas(321) Error: Field or method identifier expected
    ActiveKOL.pas(322) Error: Field or method identifier expected
    ActiveKOL.pas(323) Error: Field or method identifier expected
    ActiveKOL.pas(340) Error: Field or method identifier expected
    ActiveKOL.pas(341) Error: Field or method identifier expected
    ActiveKOL.pas(828) Error: Undeclared identifier: 'fVisible'
    ActiveKOL.pas(828) Error: Operator not applicable to this operand type
    ActiveKOL.pas(950) Error: Missing operator or semicolon
    ActiveKOL.pas(1325) Error: Undeclared identifier: 'fIsControl'
    ActiveKOL.pas(1327) Error: Incompatible types: 'TStyle' and 'Integer'
    ActiveKOL.pas(1369) Error: Undeclared identifier: 'fVisible'
    ActiveKOL.pas(1454) Error: Undeclared identifier: 'FOnKeyDown'
    ActiveKOL.pas(1454) Error: Incompatible types
    ActiveKOL.pas(1459) Error: Undeclared identifier: 'FOnChar'
    ActiveKOL.pas(1464) Error: Undeclared identifier: 'FOnKeyUp'
    ActiveKOL.pas(1550) Error: Undeclared identifier: 'fOnMouseDblClk'
    ActiveKOL.pas(1550) Error: Not enough actual parameters
    ActiveKOL.pas(1606) Error: Undeclared identifier: 'fOnChar'
    ActiveKOL.pas(1606) Error: Not enough actual parameters
    ActiveKOL.pas(1743) Error: Undeclared identifier: 'fCurrentControl'
    ActiveKOL.pas(1743) Error: Operator not applicable to this operand type
    ActiveKOL.pas(1744) Error: Undeclared identifier: 'fCurrentControl'
    ActiveKOL.pas(1744) Error: Operator not applicable to this operand type
    ActiveKOL.pas(1745) Error: Undeclared identifier: 'fCurrentControl'
    ActiveKOL.pas(1745) Error: Missing operator or semicolon
    ActiveKOL.pas(1746) Error: Undeclared identifier: 'fCurrentControl'
    ActiveKOL.pas(1748) Error: Undeclared identifier: 'fCurrentControl'
    ActiveKOL.pas(1748) Error: Operator not applicable to this operand type
    ActiveKOL.pas(1749) Error: Undeclared identifier: 'fCurrentControl'
    ActiveKOL.pas(2624)
    ActiveKOL.pas(406) Error: Unsatisfied forward or external declaration: 'TOleServer.InitServerData'
    ActiveKOL.pas(431) Error: Unsatisfied forward or external declaration: 'TOleServer.Connect'
    ActiveKOL.pas(432) Error: Unsatisfied forward or external declaration: 'TOleServer.Disconnect'

  • QAZ (07.10.10 12:03) [74]

    > Решение с BCM_SETIMAGELIST плохо тем, что оно действительно
    > только с XP

    ну так для олда есть BM_SETIMAGE +\- BS_BITMAP,BS_ICON
  • Dy1 (07.10.10 12:06) [75]
    > > Решение с BCM_SETIMAGELIST плохо тем, что оно действительно
    > > только с XP
    > ну так для олда есть BM_SETIMAGE +\- BS_BITMAP,BS_ICON

    для какого олда? Я сейчас встречаю w2k и выше.
  • QAZ (07.10.10 12:10) [76]

    > для какого олда?

    от 95\nt4 до xp
  • Vladimir Kladov © (07.10.10 15:54) [77]
    Исправил падение (пример с таб-контролом). Причина не в соственно таб-контроле, в общем нашел.

    Новые версии 3.00.C на сайте: KOL.zip, MCK.zip, ActiveKOL.zip, KOLadd.zip.
  • Jon © (07.10.10 20:54) [78]
    Error with tooltips:


    dcc32.exe -b -dUSE_MHTOOLTIP KOL.pas

    Borland Delphi Version 15.0
    Copyright (c) 1983,2002 Borland Software Corporation
    KOLDEF.INC(253)
    KOLDEF.INC(253)
    delphidef.inc(48)
    delphicommctrl.inc(1569)
    KOL_ansi.inc(2307)
    KOLMHToolTip.pas(909)
    KOLMHToolTip.pas(909)
    KOLMHToolTip.pas(909)
    KOLMHToolTip.pas(909)
    KOLMHToolTip.pas(909)
    KOLMHToolTip.pas(37) Error: Undeclared identifier: 'TMHHint'
    KOL_ansi.inc(2307)
    KOLMHToolTip.pas(898) Error: Undeclared identifier: 'NewHint'
    KOLMHToolTip.pas(909)
    KOLMHToolTip.pas(190) Error: Undeclared identifier: 'PMHToolTip'
    KOLMHToolTip.pas(199) Error: Incompatible types
    KOLMHToolTip.pas(266) Error: Function needs result type
    KOLMHToolTip.pas(266) Error: '=' expected but ')' found
    KOLMHToolTip.pas(267) Error: Missing operator or semicolon
    KOLMHToolTip.pas(268) Error: Undeclared identifier: 'fHandle'
    KOLMHToolTip.pas(272) Error: Identifier redeclared: 'TMHToolTip'
    KOLMHToolTip.pas(272) Error: '=' expected but ',' found
    KOLMHToolTip.pas(272) Error: '=' expected but ')' found
    KOLMHToolTip.pas(273) Error: Expression expected but 'BEGIN' found
    KOLMHToolTip.pas(274) Error: Undeclared identifier: 'handle'
    KOLMHToolTip.pas(278) Error: Function needs result type
    KOLMHToolTip.pas(278) Error: '=' expected but ')' found
    KOLMHToolTip.pas(279) Error: Missing operator or semicolon
    KOLMHToolTip.pas(280) Error: Undeclared identifier: 'handle'
    KOLMHToolTip.pas(283) Error: Identifier redeclared: 'TMHToolTip'
    KOLMHToolTip.pas(283) Error: '=' expected but ';' found
    KOLMHToolTip.pas(283) Error: '=' expected but ')' found
    KOLMHToolTip.pas(285) Error: Undeclared identifier: 'handle'
    KOLMHToolTip.pas(288) Error: Function needs result type
    KOLMHToolTip.pas(290) Error: Undeclared identifier: 'fHandle'
    KOLMHToolTip.pas(293) Error: Identifier redeclared: 'TMHToolTip'
    KOLMHToolTip.pas(293) Error: '=' expected but ')' found
    KOLMHToolTip.pas(295) Error: Undeclared identifier: 'fHandle'
    KOLMHToolTip.pas(323) Error: Function needs result type
    KOLMHToolTip.pas(325) Error: Undeclared identifier: 'fHandle'
    KOLMHToolTip.pas(328) Error: Identifier redeclared: 'TMHToolTip'
    KOLMHToolTip.pas(328) Error: '=' expected but ')' found
    KOLMHToolTip.pas(329) Error: ';' expected but 'BEGIN' found
    KOLMHToolTip.pas(330) Error: Undeclared identifier: 'fHandle'
    KOLMHToolTip.pas(333) Error: Function needs result type
    KOLMHToolTip.pas(339) Error: Identifier redeclared: 'TMHToolTip'
    KOLMHToolTip.pas(339) Error: '=' expected but ')' found
    KOLMHToolTip.pas(341) Error: Undeclared identifier: 'fHandle'
    KOLMHToolTip.pas(344) Error: Identifier redeclared: 'TMHToolTip'
    KOLMHToolTip.pas(346) Error: Undeclared identifier: 'fHandle'
    KOLMHToolTip.pas(349) Error: Identifier redeclared: 'TMHToolTip'
    KOLMHToolTip.pas(351) Error: Undeclared identifier: 'fHandle'
    KOLMHToolTip.pas(408) Error: Identifier redeclared: 'TMHToolTip'
    KOLMHToolTip.pas(410) Error: This form of method call only allowed in methods of derived types
    KOLMHToolTip.pas(411) Error: Undeclared identifier: 'fHandle'
    KOLMHToolTip.pas(416) Error: Object type required
    KOLMHToolTip.pas(418) Error: ';' expected but 'WITH' found
    KOLMHToolTip.pas(420) Error: Undeclared identifier: 'Parent'
    KOLMHToolTip.pas(421) Error: Undeclared identifier: 'ToolTip'
    KOLMHToolTip.pas(422) Error: Undeclared identifier: 'HasTool'
    KOLMHToolTip.pas(423) Error: '.' expected but ';' found
    KOLMHToolTip.pas(425) Warning: Text after final 'END.' - ignored by compiler
    KOLMHToolTip.pas(909)
    KOL_ASM.inc(15344)
    KOL.pas(63679)
    KOL.pas(705) Error: Unsatisfied forward or external declaration: 'TObj.Destroy'
    KOL.pas(725) Error: Unsatisfied forward or external declaration: 'TObj.RefDec'
    KOL.pas(774) Error: Unsatisfied forward or external declaration: 'TObj.Create'
    KOL.pas(790) Error: Unsatisfied forward or external declaration: 'TObj.Add2AutoFree'
    KOL.pas(795) Error: Unsatisfied forward or external declaration: 'TObj.Add2AutoFreeEx'
    KOL.pas(799) Error: Unsatisfied forward or external declaration: 'TObj.RemoveFromAutoFree'
    KOL.pas(837) Error: Unsatisfied forward or external declaration: 'TList.Destroy'
    KOL.pas(840) Error: Unsatisfied forward or external declaration: 'TList.SetCapacity'
    KOL.pas(841) Error: Unsatisfied forward or external declaration: 'TList.Get'
    KOL.pas(842) Error: Unsatisfied forward or external declaration: 'TList.Put'
    KOL.pas(303) Fatal: Compilation terminated; too many errors

  • Jon © (08.10.10 14:24) [79]
    Event OnDropFiles not working too.
 
Конференция "KOL" » KOL v 3.00 [Delphi, Windows]
Есть новые Нет новых   [120345   +8][b:0.001][p:0.021]